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
- Use the toggle at the top to pick 'Hex to text' or 'Text to hex'.
- In 'Hex to text', paste the hex into the input box; spaces and 0x prefixes are fine.
- In 'Text to hex', type your text, then set a Separator (such as a space) and tick Uppercase if you want.
- Read the decoded text or hex output in the lower box.
- If the hex is invalid, an error appears next to the output; fix it and the result updates.
- 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
- Hex, bytes and UTF-8: how text becomes hexadecimal
Why two hex digits make one byte, how UTF-8 maps characters to bytes, and how tolerant parsing of spaces and 0x prefixes works.
Related tools
Base32 Encode
Base32 encode and decode text online using the standard RFC 4648 alphabet with proper padding. UTF-8 safe, fast and private in your browser.
Binary Translator
Translate text to binary and binary back to text online. UTF-8 accurate, handles emoji and accents, with a copy button. Runs in your browser, nothing uploaded.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.