UTF-8 binary and hexadecimal converter
Convert text to UTF-8 binary or hexadecimal bytes and back.
How it works
Choose text to bytes or bytes to text, then binary or hexadecimal notation. Encoding uses UTF-8, not UTF-16 code units. Decoding rejects malformed byte groups and invalid UTF-8 instead of inserting replacement characters. A leading UTF-8 BOM is preserved as U+FEFF.
UTF-8 byte examples
A = 41 (hex) = 01000001 (binary). é = C3 A9 and 😀 = F0 9F 98 80. A character can occupy more than one byte. Choose lowercase hexadecimal output to write Café as 43 61 66 c3 a9 rather than 43 61 66 C3 A9. The bytes are identical; only the notation changes. The case selector applies to hexadecimal encoding, not binary or decoding.
Decode either a continuous sequence of complete bytes or groups of exactly two hexadecimal digits or eight binary digits separated by ASCII spaces, tabs or line breaks. No prefixes, commas or partial groups. Hexadecimal input is case-insensitive. Empty input gives an empty result. Limit: 4,000 bytes, 4,000 UTF-16 input units when encoding, and 40,000 input units when decoding. Browser text fields normalize CR and CRLF to LF; use byte notation to represent exact CR bytes. Copy uses the unmodified decoded string, although clipboard software and text fields can normalize line endings or omit control characters. Invisible characters, including a leading BOM, are retained. Use Copy UTF-8 conversion summary to export the displayed counts as tab-separated Metric and Value columns. Aé😀 encodes to 41 C3 A9 F0 9F 98 80 (7 UTF-8 bytes); decoding gives 3 Unicode code points. The code-point count is included only when decoding. The summary excludes the source and converted text.
See Unicode inspector · Unicode normalization · HTML reference converter · Base64 encoder and decoder. Byte hex is different from a Unicode code point or an HTML hexadecimal reference. Read WHATWG Encoding Standard or RFC 3629.
Related: URL encoder and decoder.