Hex to Text and Text to Hex: Fast UTF-8 Guide
Hexadecimal is base-16 — the same numerical value represented more compactly than binary, using digits 0 through 9 and letters A through F. Every byte of data can be represented as exactly two hex characters, which is why hex shows up everywhere in development: color codes (#FF5733), file headers (FF D8 FF for JPEG), network packets, and text encoding. Our Text to Hex and Hex to Text tools handle conversion instantly so you can inspect text encoding without writing a script.
What Hex Actually Is: Base-16 Explained
In decimal (base-10), each digit can be 0-9. In binary (base-2), each digit can be 0 or 1. In hexadecimal (base-16), each digit can be 0-9 or A-F, where A=10, B=11, C=12, D=13, E=14, F=15. This means a single hex digit represents four binary bits, and two hex digits represent eight bits — one byte.
Hex is preferred over binary for human inspection because it is four times more compact. The byte 01000001 in binary is 41 in hex — the same value, much easier to read and write.
UTF-8 Encoding Table: Common Characters in Hex
Under UTF-8, each standard ASCII character maps to a single byte and therefore two hex characters:
| Character | Hex | Character | Hex |
|---|---|---|---|
| A | 41 | a | 61 |
| B | 42 | b | 62 |
| Z | 5A | z | 7A |
| 0 | 30 | 9 | 39 |
| Space | 20 | ! | 21 |
| Newline (LF) | 0A | Tab | 09 |
| @ | 40 | . | 2E |
So "Hello" in hex is: 48 65 6C 6C 6F. Paste that into Hex to Text and you get "Hello" back. Paste "Hello" into Text to Hex and you get those same five byte pairs.
Practical Debug Scenarios
Reading a Hex Dump
Hex dumps appear in debugging tools, hex editors, and network packet analyzers. If you are looking at a dump and need to quickly read what text it contains, copy the hex values and paste them into Hex to Text. This is faster than manually cross-referencing an ASCII table.
Inspecting Network Packets
Tools like Wireshark display packet payloads in hex. When a payload contains HTTP headers or plain-text content, you can copy the hex and decode it to see the readable content. This is particularly useful when debugging API responses or looking for specific strings in a packet capture.
Verifying Character Encoding
When you suspect a character encoding issue — for example, when a special character like é shows up as garbled text — converting the problematic text to hex can show you exactly which bytes are being produced. If "é" produces C3 A9 in hex, the encoding is UTF-8. If it produces E9, the encoding is ISO-8859-1 (Latin-1). That distinction tells you exactly what conversion is needed.
Common Mistakes When Working With Hex
- Confusing hex with binary: Binary is 0s and 1s; hex is 0-9 and A-F. They represent the same underlying values but in different bases.
- Missing spaces between bytes: Some hex tools output bytes with spaces (48 65 6C), others without (48656C). Removing spaces when the decoder expects them — or adding them when not expected — will produce wrong results.
- Expecting readable output from non-text hex: Not every hex string represents text. Image data, audio data, and compressed data all produce hex output that looks like gibberish when you try to decode it as text.
Encoding Gotchas With Non-ASCII Characters
ASCII characters (the standard English alphabet, digits, and common punctuation) map to single bytes in UTF-8. Characters outside ASCII — accented letters, emoji, Chinese characters — take multiple bytes. The character "€" (Euro sign) encodes as three bytes in UTF-8: E2 82 AC. An emoji like 😀 encodes as four bytes: F0 9F 98 80. If you are working with hex that includes non-ASCII content, make sure your decoder is set to UTF-8 to interpret multi-byte sequences correctly.
Use these tools
Keep exploring the encoding and decoding tools
This post belongs to the encoding cluster. Jump straight into the main tool, then browse related tools and the full hub.
Primary tool
Text to Hex
Convert text to hexadecimal values using UTF-8 encoding. This Text to Hex converter transforms plain text into hexadecimal representation using 8-bit ASCII encoding for each character.
Hex to Text
Decode hexadecimal values back into readable text instantly. This Hex to Text converter reads byte pairs and converts them back to UTF-8 text for debugging, learning, and data inspection.
Numbers to Letters Converter
Use this numbers to letters calculator to decode 1-26 into A-Z instantly. This A1Z26 decoder converts sequences like 20 5 24 20 into TEXT for ciphers, puzzles, games, and classroom activities.

