b: BYTE INSPECTOR
FIELD GUIDE / ENCODING FUNDAMENTALS

Hex to text: inspect UTF-8 without losing bytes

Hex describes bytes. A charset gives those bytes meaning. Keep those two steps separate.

Open the workbench ↗

Two hex digits make one byte

C3 A9 and C3A9 describe the same two bytes. This inspector accepts upper- or lowercase digits and explicit ASCII spaces, tabs, CR and LF as separators. Other characters, including colons, commas, nonbreaking spaces and 0x prefixes, are rejected. An odd digit count is an error; the tool never adds a zero or drops a nibble.

Byte offsets in the hex panel are hexadecimal and start at 000000. Diagnostic offsets are decimal and also start at zero. The display groups eight bytes per row and previews the first 256; the download retains the complete original bytes.

Why C3 A9 is one character

Under UTF-8, C3 starts a two-byte sequence and A9 continues it. The result is é, U+00E9: one Unicode code point, two UTF-8 bytes, and four standard Base64 characters (w6k=). Character counts in this tool are code points, not user-perceived grapheme clusters. A letter plus a combining accent can contain two code points even if it looks like one character.

BytesUTF-8 resultInterpretation
41A1 byte, 1 code point
C3 A9é2 bytes, 1 code point
F0 9F 98 80😀4 bytes, 1 code point
C3 28Rejected in strict modeExpected continuation 80–BF at byte 1

Strict and replacement modes have different promises

Strict mode rejects malformed UTF-8: overlong encodings, surrogate encodings, values above U+10FFFF, isolated continuation bytes and truncated sequences. The original bytes remain available. In Replacement mode, invalid subsequences become U+FFFD. This can change byte length and destroys exact original-byte mapping for the text view, so that mapping is explicitly unavailable.

For C3 28, replacement text is �(. Re-encoding that text produces EF BF BD 28. The round-trip panel reports the length change and differing byte positions. It does not claim a minimal edit-distance alignment.

BOMs and characters you cannot see

A leading UTF-8 BOM is EF BB BF. This inspector preserves it as U+FEFF rather than silently removing it, so a valid UTF-8 round trip stays exact. It also highlights listed controls and formatting characters such as NUL, tab, line feed, no-break space, zero-width space, joiners and bidirectional controls.

In EF BB BF 41 E2 80 8B 42 0A, the BOM is at byte 0, A at 3, zero-width space at 4, B at 7 and line feed at 8. This is a useful test when copied text looks identical but byte comparisons differ. The inventory covers common diagnostic characters, not every Unicode property.

Explicitly supported charsets

Choose UTF-8 or 7-bit ASCII. ASCII rejects bytes above 7F in strict mode. Its replacement output uses U+FFFD, which cannot be encoded back into ASCII, so that round trip is blocked. No Windows-1252, ISO-8859-1, UTF-16 or automatic detection is implied. UTF-16-like leading BOMs are flagged as clues, not used to switch charsets.

Use Open binary file to inspect up to 1 MiB without text-editor transformations. Save session downloads a local JSON snapshot with input and settings. Restore session recomputes every view; it never trusts saved HTML. The page itself keeps no local-storage history and sends no source content to a server.

References and reproducibility

Encoding rules: RFC 4648 §§3–5 and 10. UTF-8 decoding and BOM behavior: WHATWG Encoding Standard. The workbench uses browser-native text and binary primitives with explicit validation. It does not normalize Unicode or remove line endings.