Boneyard Tools

Hex to ASCII and ASCII to Hex

Hex to ASCII decodes a string of hexadecimal digits back into readable text, and flips to encode plain text as hex. In the hex direction it ignores spaces and strips an optional 0x on each byte, then decodes the bytes as UTF-8. In the text direction you can space out the bytes and choose upper or lower case digits. Both directions run instantly as you type.

How to convert hex to ASCII

  1. Use the toggle at the top to pick 'Hex to text' or 'Text to hex'.
  2. In 'Hex to text', paste the hex into the input box; spaces and 0x prefixes are fine.
  3. In 'Text to hex', type your text, then set a Separator (such as a space) and tick Uppercase if you want.
  4. Read the decoded text or hex output in the lower box.
  5. If the hex is invalid, an error appears next to the output; fix it and the result updates.
  6. Click Copy to grab the result.

Examples

Decode hex to text (spaces ignored)

48 65 6c 6c 6f
Hello

Encode text to hex with a space separator

Hi
48 69

Round-trip a UTF-8 accent

636166c3a9
cafΓ©

Frequently asked questions

Can I paste hex with spaces or a 0x prefix?

Yes. In the hex-to-text direction all whitespace is ignored and an optional 0x or 0X in front of each byte is stripped, so '0x48 0x65' decodes to 'He'. This lets you paste hex copied from a debugger, hex dump or code listing without cleaning it up first.

Why do I get an error about an odd length?

Each byte is exactly two hex digits, so the input must have an even number of digits after spaces and 0x prefixes are removed. An odd count means one byte is missing a digit, so the tool stops and asks you to add it rather than guessing.

What happens if I include a non-hex character?

Decoding only accepts the digits 0 to 9 and letters A to F in either case. Any other character, such as a stray g or a punctuation mark, triggers a 'contains a non-hex character' error so you do not get silently wrong output.

Does it support Unicode, not just ASCII?

Yes. Text is encoded and decoded as UTF-8, so accented letters, symbols and emoji round-trip correctly. A character like Γ© becomes two bytes (c3 a9), and a snowman becomes three bytes (e2 98 83), which is why the hex is longer than the visible text.

Can I choose uppercase or add a separator?

Yes, in the text-to-hex direction. You can output uppercase digits and set any separator string between bytes, for example a space to get '48 69' instead of '4869'. Those two options only appear when you switch to 'Text to hex'.

Is 'ASCII' or 'UTF-8' the right label?

For the classic English letters, digits and punctuation that fit in one byte, ASCII and UTF-8 are identical, so plain text behaves exactly as you expect. UTF-8 is a strict superset, so anything beyond ASCII just uses more bytes; nothing is lost.

What if I paste an empty box?

An empty input produces an empty result with no error. This makes it safe to clear the box and start over, and it means whitespace-only hex input also decodes to nothing.

Is my data private?

Yes. Everything runs locally in your browser and nothing is uploaded, so you can safely convert tokens, keys or other sensitive strings. The page also works offline once loaded.

Is there an API?

Yes. A JSON endpoint accepts a 'text' field and a 'mode' of 'hex-to-text' or 'text-to-hex', plus optional 'separator' and 'uppercase' for the encode direction, and returns the converted string.

Learn more

Related tools