PRACTICAL GUIDE

Check the UTF-8 Bytes Behind a String

Encode text as hexadecimal UTF-8 bytes or decode a hex byte sequence back to text.

Separate characters from bytes

Hex output describes bytes. Basic ASCII characters use one UTF-8 byte, while many other characters use several. Two hex digits represent one byte, so a string with five visible letters does not always produce ten hex digits.

Keep the encoding consistent

Both directions use UTF-8. If a sequence came from another encoding, decoding can fail or produce the wrong text. Confirm the source encoding before using the output to investigate an API, log entry or text-file import.

Enter complete byte pairs

Decoding accepts whitespace between pairs, such as 48 65 6c 6c 6f. A single leftover digit is rejected. The tool does not accept a 0x prefix or punctuation between bytes; remove those before pasting.

Treat binary data separately

Not every byte sequence represents text. The decoder rejects invalid UTF-8 rather than quietly replacing invalid bytes. For images, archives or other binary files, use a file-aware hex editor instead of expecting a readable string.

Put it into practice