ASCII to Hex Converter
Converts text to its hexadecimal byte representation and back. 'Hello' becomes 48 65 6c 6c 6f — one two-digit pair per byte, which is how bytes are shown in packet captures, hex editors and protocol documentation.
Text is encoded as UTF-8 before conversion, so a character outside ASCII produces the multiple bytes it genuinely occupies. The letter é is two bytes, and an emoji is four.
How to use it
- Type or paste text on the left to see its hex bytes on the right.
- Press Swap to go the other way and decode hex back into text.
- Paste hex in whatever shape you have it — spaced, comma-separated, 0x-prefixed or one continuous run.
Accepted input when decoding
The decoder strips 0x and \x prefixes and ignores spaces, commas, semicolons, colons, underscores and hyphens, so you can paste straight from a debugger, a log line or a hex dump without cleaning it up first.
It rejects rather than guesses: a non-hexadecimal character, or an odd number of digits, produces a clear error. Silently dropping a stray digit would corrupt every byte after it.
Frequently asked questions
Why does one character produce more than two hex digits?
- Because hex represents bytes, not characters, and UTF-8 uses one to four bytes per character. 'A' is 41, 'é' is c3 a9, and '😊' is f0 9f 98 8a.
Can I decode a hex dump copied from a terminal?
- Usually yes — separators and 0x prefixes are ignored. Strip any address column or ASCII sidebar first, since those are not part of the data.
What if the hex is not valid UTF-8?
- Decoding reports an error rather than returning replacement characters, so you know the bytes are binary rather than text.