Text to Hex Converter
Type any text and get its UTF-8 bytes as two-digit hex pairs.
Going the other way? Use the hex to text converter.
To convert text to hex, write each character's code number in base 16 as a two-digit pair. Capital H has code 72, which is 48 in hex, and lowercase i is 69. So "Hi" becomes 48 69. The converter above does every character for you as you type.
How it works
Every character gets stored as one or more bytes, and hex is the standard human-friendly way to write bytes. A byte holds eight bits, those eight bits split into two groups of four, and each group maps to a single hex digit from 0 to F. Result: every byte is exactly two hex characters, no exceptions.
Worked example with "Hi". Capital H has code 72. Written in binary that byte is 01001000; split it into 0100 and 1000, and those two 4-bit groups become the hex digits 4 and 8. Lowercase i is code 105, which becomes 69 the same way. Output: 48 69.
Text beyond plain English works too, because the converter encodes UTF-8. An accented é comes out as two pairs, most emoji as four. That is not this page being wasteful; those characters genuinely occupy more bytes in files and network traffic, and the hex shows you exactly how many.
You have met this output before even if you never asked for it. The %20 in a web address is a hex byte for the space character. Programmers read the same pairs in hex dumps and network captures all day, which is why a converter in this direction earns its keep: it shows you what your text looks like to the machinery underneath.
Common characters as hex
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| H | 72 | 48 | 01001000 |
| i | 105 | 69 | 01101001 |
| A | 65 | 41 | 01000001 |
| a | 97 | 61 | 01100001 |
| 0 | 48 | 30 | 00110000 |
| space | 32 | 20 | 00100000 |
Digits 0 to 9 sit at hex 30 to 39, so the last hex digit of a numeral is the numeral itself. Small patterns like that make hex surprisingly readable with practice.
FAQ
How do I convert text to hex?
Look up each character's code number and write it in base 16 as a two-digit pair. Capital H has code 72, which is 48 in hex. Do that for every character in order, so "Hi" becomes 48 69. The converter above runs those steps live as you type.
Why does each character become two hex digits?
A character from the ASCII range is stored as one byte, which is eight bits, and eight bits split into two groups of four. Each 4-bit group is exactly one hex digit. Characters beyond ASCII take two to four bytes in UTF-8, so they produce four to eight hex digits.
Is hex output different data from binary output?
No, it is the same bytes in a shorter costume. Each hex digit stands for four binary digits, so the byte 01001000 and the pair 48 describe the identical value 72. Hex exists because eight-digit binary strings are hard for humans to scan.