Hex Code Translator
Convert text to hex and back - free, UTF-8 safe.
What this tool does
Switch between Text to hex and Hex to text, type or paste your content, and see the conversion instantly. Each character becomes its UTF-8 byte pattern as two-digit hexadecimal groups, which is why accented letters, symbols and emoji convert correctly - a converter that only handles the first 128 ASCII characters would garble anything outside that range.
Converts text to hexadecimal by encoding it as UTF-8 bytes first, then showing each byte as a two-digit hex value - correct for accented letters and emoji, not just plain ASCII.
Converts hex back to text the same way, decoding the byte sequence as UTF-8.
Shows byte and hex-digit counts alongside the result.
Accepts hex input with or without a leading '0x' and with either spaces or commas between byte pairs when converting hex back to text.
How to use it
- Choose Text to hex or Hex to text.
- Type or paste your content.
- Copy the result.
Why use this translator
Hex dumps and byte values appear in programming, networking and debugging. Converting text to hexadecimal as UTF-8 bytes gives correct results for any character.
Why we built it
We built the hex code translator to encode through UTF-8 bytes first, so non-English text round-trips correctly. Convert between bases with the number base converter and look up characters in the ASCII table.
For a neighbouring job there is also the IP Address Extractor.
Who this tool is for
- Developers and students
- Security and network learners
- Puzzle makers
When to use it
- Inspecting the bytes of a string.
- Preparing or decoding hex data.
- Debugging encoding problems.
- Learning how text maps to bytes.
Why UTF-8 bytes, not just ASCII
A character can take more than one byte, and a naive converter breaks on anything outside plain English.
Plain ASCII only covers 128 characters - the basic unaccented English alphabet, digits and punctuation. Anything beyond that, from an accented letter like 'e with an acute accent' to an emoji, needs more than one byte to represent in UTF-8, the standard text encoding used almost everywhere online. This tool encodes to UTF-8 bytes first and then shows those bytes in hex, which is why it correctly round-trips text a naive character-code-only converter would corrupt.
What the hex ranges actually mean
Which half of 00-FF a byte falls into tells you whether it's a whole ASCII character or part of a multi-byte one.
Every byte is a value from 00 to FF. In UTF-8, a byte from 00 to 7F is always a complete one-byte ASCII character on its own. A byte from C0 to DF starts a two-byte character, E0 to EF starts a three-byte character, and F0 to F7 starts a four-byte character - while any byte from 80 to BF is a continuation byte that belongs to one of those multi-byte sequences and never starts a character by itself. That's why 'A' converts to the single hex byte 41, sitting in the 00-7F range, while 'é' converts to the two-byte pair c3 a9: c3 falls in the two-byte lead range, and a9 is a continuation byte.
| Character | UTF-8 bytes | Hex |
|---|---|---|
| A (plain ASCII) | 1 | 41 |
| é (accented letter) | 2 | c3 a9 |
| € (currency symbol) | 3 | e2 82 ac |
| 😀 (emoji) | 4 | f0 9f 98 80 |
What you give it, and what you get back
| Item | Details |
|---|---|
| Input | Text, or hex byte pairs separated by spaces or commas. |
| Output | Hex bytes or decoded text, with counts. |
| Notes | A leading 0x is accepted. |
Issues you may run into
| What you see | Why it happens | What to do |
|---|---|---|
| Decoding fails | An odd number of hex digits or invalid characters. | Check the pairs. |
| Different from ASCII table | Non-ASCII characters use several bytes. | This is expected in UTF-8. |
| Spaces missing | Output uses separators for readability. | Remove them if you need a continuous string. |
Assumptions and limitations
- Hex-to-text mode accepts space or comma-separated byte pairs, with or without a leading '0x'; malformed or incomplete groups produce an incomplete result and are flagged.
- This shows hex as human-readable byte pairs with separators, not an unbroken hex string.
Frequently asked questions
How do I convert text to hex online for free?
Choose Text to hex, type your text, and the hexadecimal result appears instantly, one two-digit group per byte.
Does this handle emoji and accented letters?
Yes - it encodes to UTF-8 bytes first, which is why multi-byte characters like emoji and accented letters convert and decode correctly, unlike a converter that only handles plain ASCII.
Can I convert hex back to text?
Yes - switch to Hex to text, paste space or comma-separated hex byte pairs, and the decoded text appears instantly.
Why did I get strange characters back?
This usually means the hex groups weren't valid byte values or didn't form a complete, valid UTF-8 sequence - check for missing or malformed groups.
Is my data uploaded anywhere?
No. Conversion happens entirely in your browser - nothing is sent to a server.
What do the hex byte ranges actually mean?
A byte from 00 to 7F is a complete one-byte ASCII character on its own. C0-DF starts a two-byte character, E0-EF starts a three-byte one, and F0-F7 starts a four-byte one, while 80-BF is always a continuation byte belonging to one of those sequences.
Why is 'é' two hex bytes but 'A' is only one?
'A' is plain ASCII, which UTF-8 always represents in a single byte. 'é' falls outside the ASCII range, so UTF-8 needs two bytes (c3 a9) to represent it - the same reason emoji typically take four bytes each.