Hex to text converter
Decode hexadecimal into readable text, or encode text as hex, in either direction. Spaces, 0x and \x prefixes are handled for you.
Hex ⇄ decimal
0xFF · binary 11111111
Why two hex digits make one byte
Hexadecimal counts in sixteens, using 0–9 and then A–F for ten to fifteen. Four bits can hold exactly sixteen values (0000 to 1111), so each hex digit maps to one half-byte, called a nibble.
A byte is two nibbles, therefore two hex digits: the left one counts sixteens, the right one counts ones. 4D is 4 × 16 + 13 = 77, the letter M. Slide through the values to see how the digits roll over from F back to 0.
0x4D = 64 + 13 = 77, which in ASCII is “M”.
ASCII table: hex, decimal, character
| Hex | Dec | Char | Hex | Dec | Char |
|---|---|---|---|---|---|
| 20 | 32 | space | 50 | 80 | P |
| 21 | 33 | ! | 51 | 81 | Q |
| 22 | 34 | " | 52 | 82 | R |
| 23 | 35 | # | 53 | 83 | S |
| 24 | 36 | $ | 54 | 84 | T |
| 25 | 37 | % | 55 | 85 | U |
| 26 | 38 | & | 56 | 86 | V |
| 27 | 39 | ' | 57 | 87 | W |
| 28 | 40 | ( | 58 | 88 | X |
| 29 | 41 | ) | 59 | 89 | Y |
| 2A | 42 | * | 5A | 90 | Z |
| 2B | 43 | + | 5B | 91 | [ |
| 2C | 44 | , | 5C | 92 | \ |
| 2D | 45 | - | 5D | 93 | ] |
| 2E | 46 | . | 5E | 94 | ^ |
| 2F | 47 | / | 5F | 95 | _ |
| 30 | 48 | 0 | 60 | 96 | ` |
| 31 | 49 | 1 | 61 | 97 | a |
| 32 | 50 | 2 | 62 | 98 | b |
| 33 | 51 | 3 | 63 | 99 | c |
| 34 | 52 | 4 | 64 | 100 | d |
| 35 | 53 | 5 | 65 | 101 | e |
| 36 | 54 | 6 | 66 | 102 | f |
| 37 | 55 | 7 | 67 | 103 | g |
| 38 | 56 | 8 | 68 | 104 | h |
| 39 | 57 | 9 | 69 | 105 | i |
| 3A | 58 | : | 6A | 106 | j |
| 3B | 59 | ; | 6B | 107 | k |
| 3C | 60 | < | 6C | 108 | l |
| 3D | 61 | = | 6D | 109 | m |
| 3E | 62 | > | 6E | 110 | n |
| 3F | 63 | ? | 6F | 111 | o |
| 40 | 64 | @ | 70 | 112 | p |
| 41 | 65 | A | 71 | 113 | q |
| 42 | 66 | B | 72 | 114 | r |
| 43 | 67 | C | 73 | 115 | s |
| 44 | 68 | D | 74 | 116 | t |
| 45 | 69 | E | 75 | 117 | u |
| 46 | 70 | F | 76 | 118 | v |
| 47 | 71 | G | 77 | 119 | w |
| 48 | 72 | H | 78 | 120 | x |
| 49 | 73 | I | 79 | 121 | y |
| 4A | 74 | J | 7A | 122 | z |
| 4B | 75 | K | 7B | 123 | { |
| 4C | 76 | L | 7C | 124 | | |
| 4D | 77 | M | 7D | 125 | } |
| 4E | 78 | N | 7E | 126 | ~ |
| 4F | 79 | O |
Questions people ask
How do I convert hex to text?
Paste the hex string into the box. Spaces, commas, colons and 0x or \x prefixes are ignored. Every two hex digits form one byte, and the bytes are decoded as UTF-8, so ordinary ASCII and accented or non-Latin text both decode correctly.
What is the difference between hex to text and hex to ASCII?
For codes 00–7F they are the same thing, because UTF-8 was designed to match ASCII there. Above 7F, ASCII has no characters; UTF-8 combines two to four bytes into one character, which is how this converter reads them.
Why does my hex decode to strange symbols?
Either the data is not text (for example an image, a hash or encrypted bytes), or it uses a different encoding such as UTF-16 or Windows-1252. A hash like a SHA-256 digest is meant to be kept as hex, not decoded.
Why is hex used instead of binary?
One hex digit stands for exactly four bits, so a byte is always two digits. That makes long binary data far shorter and easier to read, which is why hex appears in colour codes, memory addresses, MAC addresses and file dumps.
Prefer ones and zeros? Try the binary translator.