Hexadecimal is the developer's everyday alphabet: color codes, memory addresses, MAC addresses, protocol dumps, and error messages all speak it. This tool adds text to that list: paste any string and watch it become a sequence of two-digit hex byte values, live as you type. Hi becomes 48 69, where 48 is the hex form of the letter H's byte and 69 is the i. The conversion runs entirely in your browser, nothing is uploaded or stored, and the page is free with no signup, working the same on a phone as at a desk.
The key word, as with every text encoding, is bytes. The tool encodes your text as UTF-8 first, then shows each byte as exactly two hex digits. For basic English that is one group per character, matching the ASCII table: H is decimal 72, and 72 is 48 in hex. Beyond ASCII the byte count grows, because UTF-8 is variable length: é takes 2 bytes, most Chinese characters take 3, and emoji take 4. One visible character does not guarantee one hex pair.
Two digits per byte is the property that makes hex the lingua franca of byte-level work. One byte spans 0 to 255, and 255 is FF, exactly two hex digits. Every byte therefore has a fixed-width, compact representation, which is why hex editors show 16 bytes per line so cleanly and why protocol documentation quotes payload bytes in hex without ambiguity.
Where You Already Use Hex Every Day
CSS colors are hex bytes wearing a costume. The color #48656C is three bytes, 72, 101, 108, the values of H, e, and l, rendered as a muted blue-gray. Memory addresses in debuggers, register values in CPU manuals, MAC addresses in network settings, and hash digests from cryptographic tools are all hex by convention. Learning to read hex pairs is a small investment that pays out across all of those domains at once.
Text arrives in hex most often when bytes matter more than characters: a packet capture showing payload bytes, a hex dump of a file header, an error log quoting a protocol message. Converting your expected text to hex with this tool gives you the pattern to search for in those dumps, byte for byte. Network engineers do this constantly when checking whether a payload contains ASCII data or binary framing, and whether byte order matches expectations.
How to Use This Tool (Step by Step)
- Type or paste your text into the input box. The hex output updates live with every keystroke; there is no convert button.
- Read the output as space-separated two-digit pairs, one pair per UTF-8 byte. Multi-byte characters produce more pairs.
- Use the copy button to take the result into code, search boxes in hex editors, or homework.
- If an error message appears, it explains what could not be processed rather than failing silently.
- To reverse the process, paste the pairs into the companion hex-to-text tool; the original characters return exactly, emoji included.
Worked Examples Worth Studying
Each row is a conversion you can verify by hand using the weights 16 and 1 per hex digit.
| Input text | Bytes (decimal) | Hex output |
|---|---|---|
| Hi | 72, 105 | 48 69 |
| Hello | 72, 101, 108, 108, 111 | 48 65 6C 6C 6F |
| space | 32 | 20 |
| OK! | 79, 75, 33 | 4F 4B 21 |
| € | 226, 130, 172 | E2 82 AC |
| 中 | 228, 184, 173 | E4 B8 AD |
The € row is a favorite teaching example: one currency symbol, three bytes, because UTF-8 assigns it to the three-byte range. The last row makes the point for Chinese text. Count pairs, not characters, when size matters; five pairs is always five bytes no matter how many characters produced them.
How the Conversion Works Internally
Step one: the browser's TextEncoder converts your string into UTF-8 bytes, an array of numbers 0 to 255. Step two: each number converts to base 16. Take 105, the letter i: 105 divided by 16 is 6 remainder 9, so the hex digits are 6 and 9, written 69. Take 172: 172 divided by 16 is 10 remainder 12, and 10 is A while 12 is C, so the digits are AC. Step three: every value is padded to two digits, so 33, the exclamation mark, renders as 21 and stays a clean pair.
The padding matters for alignment. Without fixed width, a stream like 48656C could split in several plausible ways; with two digits per byte, the reverse decoder always knows exactly where each byte begins. That fixed-width property, more than compactness, is why hex won as the byte-level notation.
Common Use Cases
- Searching hex dumps: convert the text you expect to find, then search for its hex pattern in a hex editor or packet capture.
- Protocol debugging: compare the hex of your intended header or payload against what the wire captured, byte by byte.
- Encoding verification: paste suspect text and see immediately whether a character took 1, 2, 3, or 4 bytes, which explains length mismatches between systems.
- Color and design work: understanding that #48656C is literally three bytes makes the connection between text, numbers, and rendered colors concrete.
- Teaching and homework: converting your own name to hex pairs is the fastest way to make the ASCII table stick.
Hex Compared with Binary, Decimal, and Octal Text
All four notations describe the same bytes; they differ in compactness and audience. Binary shows every bit but runs eight characters per byte, best for studying individual flags. Decimal matches ASCII tables and textbook exercises, with variable-width numbers. Octal, three digits per byte, lives in C escapes and old Unix tools. Hex, two digits per byte, is the professional default: shortest fixed-width form, aligned with bytes and machine words, and understood by every hex editor and debugger you will ever open.
The same bytes of Hi appear as 48 69 in hex, 110 151 in octal, and 72 105 in decimal. If you need those forms, the site has dedicated converters running the identical UTF-8 pipeline, so outputs agree byte for byte across tools.
Tips and Best Practices
- Round-trip your work: paste the output into hex-to-text and confirm the original string returns before relying on it.
- Count pairs to measure size; the pair count equals the UTF-8 byte count, which is what file sizes and buffer limits actually measure.
- When searching a hex dump, paste the pairs without spaces if the dump is unspaced, or with spaces to match formatted views; either way the byte order is the thing to verify.
- Watch case when copying into case-sensitive contexts: 6C and 6c are the same value, but some search boxes and pattern matchers care.
- For long documents, convert a sample first to check byte counts and encoding assumptions; giant inputs render slower with no extra insight per byte.
- Treat hex as notation, not protection: anyone can decode it, so never use hex encoding to hide sensitive text.