← All Tools

UTF-8 Byte-Level Decoder

Break any string into its underlying UTF-8 bytes — or any raw byte stream into code points — and see the full anatomy of each sequence: lead byte vs continuation bytes, code point boundaries, plane and block, and every failure mode the spec catches: overlong, unpaired surrogate, out-of-range, truncated, and stray continuation. Handy for diagnosing mojibake, hunting BOMs, and understanding why one emoji is four bytes.

Byte-role legend

0x48 single-byte (ASCII) 0xE4 lead byte 0xB8 continuation byte 0xC0 illegal byte U+FFFD replacement

A well-formed UTF-8 code point is 1–4 bytes long. The number of leading 1-bits in the lead byte tells you the total length: 0xxxxxxx=1 byte, 110xxxxx=2 bytes, 1110xxxx=3 bytes, 11110xxx=4 bytes. Every following byte is a continuation matching 10xxxxxx. Bytes 0xC0, 0xC1, 0xF50xFF can never legally appear.

Failure modes