How to convert hex to text
- Paste your hex string, e.g.
48 65 6C 6C 6F,0x48,0x65or\x48\x65. Any mix of separators works. - The decoded text appears instantly. If the characters look wrong, choose another encoding: UTF-8, ASCII/Latin-1 or UTF-16.
- Copy the text or download it as a file. Press Swap to turn the text back into hex.
How hex to ASCII decoding works
Every pair of hex digits is one byte with a value from 00 to FF. In ASCII and UTF-8, the bytes 20–7E are printable characters, so 48 65 6C 6C 6F reads as H, e, l, l, o: “Hello”. Characters outside ASCII take several bytes in UTF-8.
| Hex | Character |
|---|---|
0A | Line feed (new line) |
0D | Carriage return |
20 | Space |
21 / 2C / 2E | ! / , / . |
30–39 | Digits 0–9 |
41–5A | Capital letters A–Z |
61–7A | Small letters a–z |
C3 A9 | é in UTF-8 |
E2 82 AC | € in UTF-8 |
Choosing the right encoding
- UTF-8 – the standard on the web and in most files and APIs. Plain ASCII text is valid UTF-8.
- ASCII / Latin-1 (Windows-1252) – one byte per character for Western European text from older systems. Every byte maps to a character, so decoding never fails.
- UTF-16 LE/BE – two bytes per character, used by Windows APIs, Java and JavaScript strings:
48 00 69 00is “Hi” in UTF-16 LE.
If you see � symbols, some bytes are not valid in the selected encoding – or the hex is binary data such as an image, a hash or compressed data rather than text.
Hex to string in code
- Python:
bytes.fromhex('48656c6c6f').decode() - Node.js:
Buffer.from('48656c6c6f', 'hex').toString() - Browser JavaScript:
new TextDecoder().decode(Uint8Array.from('48656c6c6f'.match(/../g), (h) => parseInt(h, 16))) - Linux and macOS:
echo 48656c6c6f | xxd -r -p
Frequently asked questions
What is the difference between hex to text and hex to ASCII?
ASCII covers 128 characters (bytes 00–7F): English letters, digits and punctuation. Hex to text also includes characters from other languages and emoji, which UTF-8 stores in 2–4 bytes. For plain English text both give the same result.
Why do I get an error about an incomplete byte?
Each byte needs exactly two hex digits. An odd number of digits usually means a leading zero is missing (write 0A, not A) or a character was lost while copying. The message shows where the problem is.
Can I decode hex that contains 0x or \x prefixes?
Yes. Prefixes such as 0x, \x and %, as well as spaces, line breaks, commas, colons and dashes, are removed automatically, so C arrays, Python byte strings and hex dumps can be pasted directly.
Is my data uploaded anywhere?
No. The hex is decoded by JavaScript in your browser and never leaves your device.