What you can do here
- Hex to text: decode a hex string into readable characters
- Hex to UTF-8: multi-byte sequences such as
E2 9C 93become✓ - Hex to ASCII and hex to Latin-1 for single-byte data
- Hex to UTF-16 (big or little endian), common in Windows and Java dumps
- Text to hex with spaced, compact, colon,
0xor\xoutput - A byte table showing each byte's hex, decimal and character
Links: /hex-to-text?mode=text-to-hex opens the reverse direction and ?enc=utf-16le preselects an encoding.
How hex to text conversion works
Every two hex digits are one byte (00–FF). The bytes are then read with a character encoding. In ASCII and UTF-8 the letter H is byte 0x48 (72), so 48 65 6C 6C 6F is Hello. UTF-8 spends 2–4 bytes on characters outside ASCII: C3 A9 is é and E2 9C 93 is ✓. Read those same bytes as Latin-1 and you get é instead — the classic “mojibake” you see when the encoding is wrong.
The input is cleaned first: whitespace, commas, colons, dashes, 0x, \x, % and U+ prefixes are removed, leaving only hex digits. An odd number of digits is reported, because half a byte cannot be decoded.
ASCII hex reference
| Hex | Char | Hex | Char | Hex | Char | Hex | Char |
|---|---|---|---|---|---|---|---|
20 | space | 30 | 0 | 41 | A | 61 | a |
21 | ! | 39 | 9 | 5A | Z | 7A | z |
22 | " | 2C | , | 2E | . | 2F | / |
0A | line feed | 0D | carriage return | 09 | tab | 00 | NUL |
7B | { | 7D | } | 3A | : | 40 | @ |
Worked example
hex : 4E 65 61 74 4A 53 4F 4E 20 E2 9C 93
bytes : 78 101 97 116 74 83 79 78 32 226 156 147
UTF-8 : NeatJSON ✓
Latin-1: NeatJSON ✓ (wrong encoding for these bytes)
Decoding hex in code
// JavaScript (browser or Node 18+)
new TextDecoder().decode(Uint8Array.from("48656c6c6f".match(/../g), h => parseInt(h, 16)));
# Python
bytes.fromhex("48 65 6c 6c 6f").decode("utf-8")
# Command line
echo 48656c6c6f | xxd -r -p
Common questions
How do I convert hex to text?
Paste the hex into the input. It is decoded as you type, two hex digits per byte, using UTF-8 unless you pick another encoding. Separators and 0x or \x prefixes are ignored.
What is the difference between hex to ASCII and hex to UTF-8?
For bytes 00–7F they are identical. Bytes 80–FF are not ASCII at all; in UTF-8 they combine into multi-byte characters like é or emoji. Choose ASCII to flag those bytes, UTF-8 to decode them.
Why do I see � or strange characters?
The bytes are not valid in the chosen encoding. � marks an invalid UTF-8 sequence, and the byte table highlights where it is. Try Latin-1 for legacy single-byte data, or UTF-16 if every other byte is 00.
Why does it say the hex has an odd number of digits?
Each byte needs exactly two hex digits, so an odd count means a digit is missing or extra. Check for a dropped leading zero, such as A instead of 0A.
How do I convert text to hex?
Click Text → Hex, paste the text, and pick a format: spaced bytes, one compact string, colons, 0x or \x escapes. The text is encoded with the selected encoding first.
Is my data uploaded?
No. Decoding uses the browser's built-in TextDecoder; nothing is sent to a server.