✦FancyText.dev

Hex Translator

Paste hexadecimal to read it as text, or type text to see its hex codes. Every byte is two hex digits, so "Hello" is 48 65 6c 6c 6f. Spaces, 0x prefixes, \x escapes and unspaced strings all decode.

48 65 6c 6c 6f

About Hex Translator

Hexadecimal is base 16. It counts 0 to 9 and then A to F, so one hex digit covers 16 values and two digits cover 256, which is exactly one byte. That is why programmers show raw bytes in hex: it is much shorter than binary and lines up with it neatly. The byte 01001000 is 48 in hex and the letter H in text.

This converter turns text into UTF-8 bytes and writes each byte as two lowercase hex digits. When decoding, it accepts the common ways people write hex: 48 65 6c, 48656c, 0x48 0x65, \x48\x65, 48-65 and 48:65. Upper and lower case mean the same thing, so 6C and 6c are both a small l.

Hex to text by hand

Split the hex into pairs. For each pair, multiply the first digit by 16 and add the second. The letters count as A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Then look the number up in an ASCII table.

Take 6c: 6 × 16 + 12 = 108, a small l. And 48: 4 × 16 + 8 = 72, a capital H. Work through 48 65 6c 6c 6f the same way and you get Hello.

Hex values worth knowing

Capital letters run from 41 (A) to 5a (Z). Small letters run from 61 (a) to 7a (z), so every small letter is 20 higher than its capital. Digits 0 to 9 are 30 to 39, and a space is 20.

Files often start with fixed bytes that name their type. A PDF begins with 25 50 44 46, which reads %PDF as text. A PNG image begins with 89 50 4e 47, and the last three of those bytes spell PNG. Web colors use hex too: #ff0000 is pure red because the red byte is ff (255) and green and blue are 00.

When the result looks like nonsense

If you get odd symbols, the hex may not be text at all. Hashes, encrypted data and image bytes look random on purpose. Another cause is an odd number of digits, which usually means one was lost when copying. Check that every byte has two digits.

Accented letters and emoji take two to four bytes in UTF-8. café is 63 61 66 c3 a9, and 😀 is f0 9f 98 80. A tool that reads each byte as its own character turns c3 a9 into é. This one reads the bytes as UTF-8, so é comes back as é.

Questions people ask

How do you convert hex to text?▼

Split the hex into two-digit pairs, turn each pair into a number (first digit × 16 + second digit), and look the number up in an ASCII table. Or paste the hex into the box above and switch to Hex → Text.

What is "I love you" in hex?▼

49 20 6c 6f 76 65 20 79 6f 75. The two 20s are the spaces.

Is hex to text the same as hex to ASCII?▼

For bytes from 00 to 7f, yes: ASCII covers exactly those 128 values. Bytes above 7f are not ASCII, so they need an encoding such as UTF-8 to become text. This converter uses UTF-8.

Why does hex use letters?▼

Base 16 needs 16 single symbols. The digits 0 to 9 give ten, and A to F stand for 10 to 15.

Can I paste hex without spaces?▼

Yes. A run like 48656c6c6f is split into pairs automatically. It needs an even number of digits.

More Translators

Next step