Format Code Now
/

Hex to UTF-8 Converter

ED-44

Paste hex bytes and click Hex to UTF-8 text to read them as characters. The bytes must be valid UTF-8, and anything else is reported instead of guessed.

Runs in your browser. Nothing is uploaded.

Hex bytes or text

Result

How to use it

  1. Paste the hex bytes, for example 48 65 6c 6c 6f or 48656c6c6f.
  2. Click Hex to UTF-8 text to decode them.
  3. Click Show code points to see each character with its U+ number and bytes.
  4. To go the other way, paste text, set the separator and case, and click UTF-8 text to hex.

How UTF-8 bytes map to characters

UTF-8 writes ASCII characters as one byte, most accented letters and many other scripts as two or three bytes, and emoji as four. So 14 bytes can be only 10 characters. The tool reads all the hex bytes first, checks they form well-formed UTF-8, and only then decodes them, so a half-cut character is reported rather than turned into a placeholder.

Accepted hex

Each byte is two hex digits. Spaces, commas, colons and dashes between bytes are fine, and so are 0x and \x prefixes, or no separator at all. Upper and lower case both work. An odd number of digits, or a non-hex character, is an error with its position. Other encodings such as Latin-1 or UTF-16 are not detected, so they show up as invalid UTF-8.

Error messages and what to do

MessageWhat it meansFix
is not a hex digit.The input has a character outside 0 to 9 and a to f.Remove it, or check that the text is hex rather than a different encoding.
No hex digits found.The input is empty or has no hex digits.Paste bytes such as 48 65 6c 6c 6f.
The bytes are not valid UTF-8 textA byte cannot start or continue a UTF-8 character at that point.Check for a missing or extra byte, or for a different encoding such as Latin-1.

Questions people ask

How do I convert hex to UTF-8?

Paste the hex bytes and click Hex to UTF-8 text. The tool reads two hex digits per byte, checks that the bytes form valid UTF-8, and shows the characters. For example, 48 69 gives Hi and e2 82 ac gives the euro sign.

Why does one character take several hex bytes?

UTF-8 uses one to four bytes per character. ASCII needs one, characters such as é need two, the euro sign needs three, and emoji need four. That is why the hex is longer than the number of characters in the text.

What if my hex is not UTF-8?

The tool reports the first byte that cannot be part of valid UTF-8 and does not guess another encoding. Latin-1 bytes such as E9 for é alone are invalid in UTF-8, because a UTF-8 character needs its continuation bytes.

Can I convert text to hex too?

Yes. Paste text and click UTF-8 text to hex. You can pick a separator, add a 0x prefix to each byte, and choose upper or lower case digits. The hex is the UTF-8 bytes of your text.

What does Show code points do?

It decodes the hex, then lists each character with its Unicode number such as U+20AC and the UTF-8 bytes that made it. It counts code points, not what a reader sees as one glyph, so a letter plus a combining accent shows as two rows.

About this tool

Hex to UTF-8 reads two hex digits per byte, with spaces, commas, colons or dashes between bytes, or none at all, and 0x or \x prefixes allowed. The bytes must form valid UTF-8; overlong forms, surrogates and cut-off sequences are reported, not repaired, and other encodings such as Latin-1 or UTF-16 are not guessed. One to four bytes make one character, so the character count can be lower than the byte count. Text to hex is the reverse. Show code points decodes the hex and lists each character with its U+ number. Nothing is uploaded.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.