Text to hex
Type your text and convert it into UTF-8 hex bytes, ready to copy.
The output is UTF-8 bytes, not code points: é gives c3 a9, not e9. Accented letters and emoji take several bytes each. It all runs in your browser: your text is never uploaded.
Example input and result
Hello 👋
Result
48 65 6c 6c 6f 20 f0 9f 91 8b
How to convert text to hex
Type or paste into “Your text” and the bytes appear in “Result” as you type, each as two lowercase digits. Hello gives 48, 65, 6c, 6c and 6f. By default every byte goes on its own line. Under “More options”, “Separator” lets you switch between “New line”, “Space”, “Comma” and “None”. Then tap “Copy result” or “Download TXT”.
- “New line” (default): one byte per line
- “Space”:
48 65 6c 6c 6f - “Comma”:
48, 65, 6c, 6c, 6f - “None”:
48656c6c6f
UTF-8 bytes versus Unicode code points
This converter writes the UTF-8 bytes of your text, not each character's Unicode number. For plain ASCII the two match: H is 48 either way. For é they don't: its code point is U+00E9, but UTF-8 stores it as two bytes, c3 a9. If your assignment or your code wants an escape like \u00e9, this output isn't that.
ñ→c3 b1(andÑ→c3 91)¿→c2 bfand¡→c2 a1€→e2 82 ac👋→f0 9f 91 8b
Spaces, line breaks, and 0x prefixes
Text converts the way you typed it. Each space is 20 and each line break 0a, so Hi and yo on two lines give 48 69 0a 79 6f. A trailing space shows up as an extra 20 at the end. The output has no 0x prefix, so add it yourself if your C or Arduino code needs one. Hex to text accepts the 0x form and reverses the conversion.
Homework, debugging and Arduino uses
Hex is the compact way programmers look at bytes: two digits per byte instead of eight bits, so a long string stays readable. Seeing the bytes also tells you what a piece of text contains, including characters you can't see on screen.
- Computer science homework on number systems and character encoding
- Debugging string comparisons that break on accents
- Preparing bytes for an Arduino, a microcontroller or a serial protocol
- CTF challenges and puzzles
- Spotting invisible characters, such as a zero width space (
e2 80 8b)
Frequently asked questions
How do I convert text to hex?
Type or paste the text into the box and copy the result. Hello gives 48 65 6c 6c 6f with the “Space” separator. Each byte is two lowercase digits, and “More options” controls how the bytes are separated.
Why does é give c3 a9 instead of e9?
This tool writes UTF-8 bytes, not code points. é is code point U+00E9, and UTF-8 stores it as two bytes, c3 a9. The single byte e9 is only right in old one-byte tables like Latin-1 or Windows-1252.
Can I get the output with 0x prefixes?
The tool doesn't add prefixes; it gives plain lowercase pairs such as 48 65. If you need 0x, choose the “Space” separator and add the prefix with find and replace in your editor. Hex to text accepts the 0x format when you want to go back.
Why does an emoji turn into four bytes?
Most emoji sit outside Unicode's basic range, and UTF-8 needs four bytes for those characters: the waving hand is f0 9f 91 8b. Emoji built from several characters, like the ones with skin tones or flags, produce even more bytes.
Do uppercase and lowercase letters give different hex?
Yes. A is 41 and a is 61; for unaccented letters, the lowercase byte is always 20 higher in hex. Type the text with the same capitals your assignment uses so the result matches the expected answer.