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
Base64 Encoder & Decoder
Encode UTF-8 text as Base64 or decode standard and URL-safe Base64 back to text.
Developer toolsText to Hex Converter
Encode text as hexadecimal UTF-8 bytes or decode a hex byte sequence back to text.
Developer toolsUnicode Inspector
See code points, UTF-16 length and UTF-8 bytes to investigate invisible characters and text differences.
Developer toolsUTF-8 Byte Size Calculator
Measure UTF-8 bytes, Unicode code points and UTF-16 code units before sending or storing text.
Developer tools