Encoding research · Version 1.0.0 · 15 October 2026

UTF-8 Bits: A 36-Case Byte Identity Casebook

The same-looking text can have different bits. Check the encoding, the code points and the decoder before calling a round trip lossless.

Here are 36 deliberately chosen cases, tested against Binary Translator and independently recomputed in Python. Every input byte and output is available to inspect.

One letter, two byte sequences

In our disclosed cases, precomposed é is C3 A9 (2 bytes). The canonically equivalent e + combining acute is 65 CC 81 (3 bytes). They may render alike, but a byte comparison will distinguish them.

Precomposed · U+00E9é11000011 10101001C3 A9 · 2 bytes · 16 bits
Decomposed · U+0065 U+0301é01100101 11001100 1000000165 CC 81 · 3 bytes · 24 bits

Unicode normalization defines NFC and NFD to handle canonical equivalence. Our converter does not normalize your input: each of these examples preserves its own bytes. Choosing normalization is a separate operation that may change those bytes.

For a reproducible check, use "\u00E9" and "e\u0301" rather than relying on how a font draws the accent. Count encoded bytes, not visible letters or JavaScript string length.

UTF-8 bits in letters, symbols and emoji

UTF-8 uses one to four bytes per Unicode scalar value. A displayed character can contain multiple scalar values; that is why an emoji sequence can exceed four bytes. ASCII uses one byte in UTF-8. W3C’s encoding guide explains the distinction between a character, its code point and its encoded bytes.

Selected text cases; byte count × 8 gives the encoded bit count.
InputCode pointsUTF-8 hex bytesBytes / bits
ASCII AU+0041411 / 8
Precomposed e with acuteU+00E9C3 A92 / 16
Decomposed e plus acuteU+0065 U+030165 CC 813 / 24
Euro signU+20ACE2 82 AC3 / 24
One Han code pointU+4E2DE4 B8 AD3 / 24
Single emojiU+1F600F0 9F 98 804 / 32
Woman technologist ZWJ sequenceU+1F469 U+200D U+1F4BBF0 9F 91 A9 E2 80 8D F0 9F 92 BB11 / 88

The woman-technologist sequence U+1F469 U+200D U+1F4BB takes 11 bytes (88 bits): four for the first emoji, three for the zero-width joiner and four for the second emoji. A count of visible symbols would miss that structure.

Try your own non-sensitive example in Text to Binary with 8-bit output. The 7-bit option accepts ASCII only. For the place-value arithmetic, use the manual binary reading guide.

Valid text is not the same as byte identity

23 of these 36 selected byte sequences survived decode → re-encode unchanged; 13 changed. Ten of the changing cases are invalid UTF-8. The other three contain an initial byte order mark (BOM). These counts describe this constructed corpus, not a failure rate for everyday text.

A leading BOM disappears on decoding

EF BB BF 41 is valid UTF-8. The decoder consumes the initial BOM and returns A. Re-encoding gives 41, so byte identity is lost even though the visible letter survives. An interior U+FEFF is preserved; a double leading BOM loses only its first occurrence in this test.

This follows the default TextDecoder BOM handling. A BOM is an encoding signature in UTF-8, not an instruction to swap byte order. See the Unicode BOM FAQ for format-specific considerations.

An invalid byte triggers a whole-input fallback

The single byte E9 is not valid UTF-8 on its own. This site maps it to U+00E9 using a Latin-1 code-point fallback, then UTF-8 encoding produces C3 A9. The fallback makes the byte readable; it does not identify the original encoding or preserve its original bytes.

The rule applies to the entire byte sequence. In the selected case 41 FF 42, all three bytes go through that fallback. It maps byte 80 to U+0080, unlike the Windows-1252 mapping used by the web’s latin1 decoder label. Do not use it as a file-encoding detector.

Inspect all 36 exact round-trip results
Input and re-encoded bytes are hexadecimal; an empty result is shown as ∅.
CaseInput bytesStrict UTF-8Re-encoded bytesIdentical?
ASCII A41Valid41Yes
ASCII word48 65 6C 6C 6FValid48 65 6C 6C 6FYes
Precomposed e with acuteC3 A9ValidC3 A9Yes
Decomposed e plus acute65 CC 81Valid65 CC 81Yes
Euro signE2 82 ACValidE2 82 ACYes
One Han code pointE4 B8 ADValidE4 B8 ADYes
Two Han code pointsE4 BD A0 E5 A5 BDValidE4 BD A0 E5 A5 BDYes
Single emojiF0 9F 98 80ValidF0 9F 98 80Yes
Woman technologist ZWJ sequenceF0 9F 91 A9 E2 80 8D F0 9F 92 BBValidF0 9F 91 A9 E2 80 8D F0 9F 92 BBYes
United Nations flag sequenceF0 9F 87 BA F0 9F 87 B3ValidF0 9F 87 BA F0 9F 87 B3Yes
Keycap sequence31 EF B8 8F E2 83 A3Valid31 EF B8 8F E2 83 A3Yes
Ordinary space20Valid20Yes
Nonbreaking spaceC2 A0ValidC2 A0Yes
Zero-width spaceE2 80 8BValidE2 80 8BYes
Line feed0AValid0AYes
CRLF0D 0AValid0D 0AYes
Tab09Valid09Yes
NUL00Valid00Yes
Leading BOM followed by AEF BB BF 41Valid41No
Interior U+FEFF41 EF BB BF 42Valid41 EF BB BF 42Yes
ASCII byte41Valid41Yes
UTF-8 e with acuteC3 A9ValidC3 A9Yes
Single Latin-1 e with acute byteE9InvalidC3 A9No
Single Latin-1 NBSP byteA0InvalidC2 A0No
Byte 80 is not the Windows-1252 euro mapping80InvalidC2 80No
Byte FFFFInvalidC3 BFNo
Overlong slash encodingC0 AFInvalidC3 80 C2 AFNo
Isolated continuation byteBFInvalidC2 BFNo
Truncated four-byte sequenceF0 9F 92InvalidC3 B0 C2 9F C2 92No
Encoded surrogateED A0 80InvalidC3 AD C2 A0 C2 80No
Above Unicode scalar rangeF4 90 80 80InvalidC3 B4 C2 90 C2 80 C2 80No
Valid ASCII surrounding an invalid byte41 FF 42Invalid41 C3 BF 42No
UTF-8 BOM onlyEF BB BFValid∅No
Two BOMs then AEF BB BF EF BB BF 41ValidEF BB BF 41No
Literal replacement characterEF BF BDValidEF BF BDYes
Highest Unicode scalar valueF4 8F BF BFValidF4 8F BF BFYes

How to diagnose a mismatch

  1. Compare the exact input and output bytes. A copied visible string is insufficient evidence of identity.
  2. Record the intended encoding. A byte such as E9 can be legitimate in another encoding while remaining invalid UTF-8.
  3. Inspect code points for combining marks, non-breaking spaces, line endings and invisible characters.
  4. Check for an initial EF BB BF and decide whether your file format expects a BOM.
  5. If original bytes matter, keep the original byte stream. Do not reconstruct a binary file from a fallback text rendering.

Methods, scope and limitations

We selected 20 text cases and 16 explicit byte sequences to exercise ASCII, accented forms, CJK, emoji, whitespace, BOMs and malformed UTF-8 boundaries. Text cases contain Unicode scalar values; malformed JavaScript surrogate strings and automatic direction detection are outside scope.

  1. Encode text cases with the actual site encodeText function and compare with explicit bytes.
  2. Feed every byte case to actual decodeBinary in strict 8-bit grouping.
  3. Record strict UTF-8 validity separately from the site output and notices.
  4. Re-encode the returned text and compare the exact byte sequence.
  5. Independently validate every row using Python standard-library codecs; UTF-8-sig models the initial BOM removal.

Results come from the site’s conversion core pinned at commit dfd9459db521ad3eab5f8b25afd81b67ab224930. The independent Python verifier checks all 36 rows with standard-library codecs, including initial-BOM removal. Full provenance is in the methods file.

This is a deterministic coverage casebook, not random sampling, a survey or a comparison of competing tools. No visitor input was collected. Rendering varies by font; the code points and bytes are the reference. The site owner produced this research, and the external standards do not endorse its findings.

Download the data and reproduce it

Save the cases, JSON results and verifier in the same folder, then run python3 reproduce-v1.py. No package installation or network connection is needed. The CSV offers the same results for a spreadsheet.

  • cases-v1.json6,335 bytesSHA-256 23ce72d40fb570b9c50977ec8abb252492600edd13e62202af8f59ab4e7a216c
  • limitations-v1.md725 bytesSHA-256 fd6a8764e1f9a425c4e8156cdcbc0947c85a4c70fbc21303e8fd46808e7dca29
  • methodology-v1.json1,949 bytesSHA-256 da616928b1aabd83244b25ec8a61a12b449b4a19bbce91ce16a9078848aa7e30
  • reproduce-v1.py3,006 bytesSHA-256 b1fcb49ea84b8ef881af11d033c93a1688ae3aa6c04b209f0f17b5773998ac2d
  • results-v1.csv3,527 bytesSHA-256 81f04ae91a44b0a29342ea57aab9c0dd7965a1b64bb4d2399ceac3e0dbcd99a4
  • results-v1.json19,532 bytesSHA-256 cdb230da06dd084642d83aa51cd7febe5f8debbf217192a89c26c5e00d423378
  • sources-v1.json1,569 bytesSHA-256 31a55e7d9bf564f9cad2757435cfb013cfc8f21ca2f88dc082930ac625c117e5

Constructed cases and result tables: CC0-1.0. Verifier: MIT. External standards retain their own licenses. Version 1.0.0 is the initial release; future changes will receive new versioned files and a change note.

To cite a specific result, link to the normalization example or the round-trip results and include “Binary Translator, version 1.0.0, 15 October 2026.” Report a correction through Contact with the case ID and the bytes you expected.

Sources

  1. Character encodings for beginners — Characters, code points and encoded bytes are distinct.
  2. Python Unicode HOWTO — Unicode encoding and normalization background.
  3. MDN TextDecoder — Decoder API, fatal mode and ignoreBOM; links to WHATWG specifications.
  4. Unicode Normalization Forms — Canonical normalization forms; not a promise of visual identity in every font.
  5. WHATWG Encoding Standard — Normative TextDecoder serialization and initial BOM handling.
  6. Unicode UTF and BOM FAQ — A BOM can change byte equality without changing displayed content.

Primary sources checked 15 October 2026. They support the encoding explanation; the downloadable corpus supports the reported counts.