Hex to UTF-8
Decode hex bytes as UTF-8 text and encode text as hex.
Hex to UTF-8 – Decode Hex Dumps into Unicode Text
When data shows up as hexadecimal – in a log line, a database BLOB, a packet capture, or a debugger's memory view – this tool decodes the bytes as UTF-8 and shows the real text, including accented letters, Asian scripts, and emoji. The reverse direction produces a spaced hex dump of any text.
Reading hex as UTF-8
UTF-8 bytes follow a strict pattern, so decoding is more than looking up each byte in a table. The sample starts with 48 65 6C 6C 6F – five one-byte ASCII characters spelling Hello. Then E4 B8 96 and E7 95 8C are two three-byte sequences for 世界, C3 BC is the two-byte ü in dünya, and F0 9F 91 8B is a four-byte emoji. The decoder groups the bytes by their lead byte and checks every continuation byte.
Invalid sequences are reported, not hidden
Many decoders silently replace broken bytes with � (U+FFFD), which makes the original problem invisible. This tool refuses to decode invalid UTF-8 and tells you, so you can find the cause:
- Truncated data – a column or buffer that was cut at a byte limit can split a character:
48 C3ends in the middle of a two-byte sequence. - Wrong encoding –
43 61 66 E9isCaféin Latin-1, butE9alone is not valid UTF-8. - Binary data – images, compressed data, and encrypted blobs are not text at all.
Where hex-encoded text comes from
- Database tools that display
BLOB,VARBINARY, orbyteacolumns as hex, such as PostgreSQL's\x48656c6c6fformat. - Application logs that dump request bodies or message payloads in hex.
- Wireshark's "Copy as Hex Stream",
xxd -p, andodoutput. - Firmware strings, NFC tags, QR code payloads, and Bluetooth characteristics.
The reverse direction, UTF-8 to Hex, gives you spaced uppercase bytes (C3 BC) that you can compare against a dump or paste into a test. For more output styles such as 0x prefixes or no separators, use String to Hex; to show the same bytes as \x or percent escapes, open the UTF-8 Converter.
Frequently Asked Questions
Why do I get 'not valid UTF-8'?
The bytes break UTF-8's rules. Typical causes are a multi-byte character cut in half (for example the hex ends with E4 B8 but the third byte is missing), a lone byte between 80 and FF from a Latin-1 or Windows-1252 source, or binary data such as an image or compressed stream. Check the end of the dump first, then try String to Hex with Latin-1 decoding if the source is a legacy system.
How do I read a MySQL or PostgreSQL BLOB as text?
Query the column as hex – HEX(col) in MySQL, encode(col, 'hex') in PostgreSQL, or SELECT col in SQLite with a hex viewer – and paste the result here. A PostgreSQL bytea value like \x48656c6c6f works directly; the leading \x is removed automatically.
Which hex dump formats are supported?
Continuous hex (48656C6C6F), bytes separated by spaces, colons, commas, or dashes, and bytes with 0x, \x, or % prefixes. Remove offset columns and the ASCII column from hexdump or xxd output before pasting.