UTF-8 Validator + Sequence Inspector

Decode any byte sequence (entered as hex or text) and validate whether it's valid UTF-8. Flag malformed sequences, overlong encodings (security issue), and invalid surrogates. Shows the byte-by-byte breakdown with the resulting code points.

How to use the UTF-8 Validator + Sequence Inspector

Enter bytes as text (UTF-8 encoded) or as hex like 48 65 6c 6c 6f, pick the input mode, and the tool decodes them, flags any invalid sequences, and shows a byte-by-byte breakdown with the resulting code points.

Validating UTF-8 byte by byte

UTF-8 encodes each Unicode code point as one to four bytes following strict rules. Real-world data breaks those rules constantly — a file truncated mid-character, bytes from another encoding mislabeled as UTF-8, or deliberately malformed input such as overlong encodings, a classic trick for sneaking text past a naive filter.

This tool decodes a byte sequence (entered as text or hex) and checks whether it is valid UTF-8, flagging malformed sequences, overlong encodings, and invalid surrogate code points, then shows the byte-by-byte breakdown with each resulting code point. To inspect individual characters and their Unicode properties, use the Unicode inspector; to detect which encoding an uploaded file uses, the file encoding detector.

Common use cases

  • Debugging mojibake — find the exact byte where a sequence stops being valid UTF-8.
  • Security review — spot overlong encodings used to bypass input filters.
  • API payloads — confirm a response body is well-formed UTF-8.
  • Truncation checks — detect a string cut off in the middle of a multibyte character.
  • Learning UTF-8 — see exactly how code points map to one, two, three, or four bytes.

Frequently asked questions

What is an overlong encoding?

Encoding a character with more bytes than necessary — for example a two-byte form of a plain ASCII character. It is invalid UTF-8 and has historically been used to slip text past security filters.

Can I paste hex bytes instead of text?

Yes. Switch to hex mode and enter bytes like 48 65 6c 6c 6f; text mode instead reads your input as UTF-8 directly.

What does it flag as invalid?

Malformed multibyte sequences, overlong encodings, and code points in the range reserved for UTF-16 surrogates.

How is this different from the encoding detector?

This validates a known byte sequence as UTF-8; the file encoding detector guesses which encoding an uploaded file uses.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: