Encodings / UTF-8 bytes
Binary Translator
Encode Unicode text as eight-bit UTF-8 byte groups, or strictly decode binary bytes without hiding malformed input.
0 / 20,000 UTF-16 units
Every Unicode scalar value is encoded as one to four UTF-8 bytes. Isolated UTF-16 surrogates are rejected.
No result yet
Each byte is padded to eight bits. One ASCII space separates adjacent bytes.
Keyboard shortcut: Ctrl+Enter or Command+Enter runs the selected direction.
Choose a direction and enter data.
Byte rules
What the bits represent
ASCII A, 1 byte
01000001Γ©, 2 bytes
11000011 10101001π, 4 bytes
11110000 10011111 10011000 10000000- Binary input grammar
- Decode accepts only ASCII 0, ASCII 1, and ASCII space, tab, CR, LF, form feed, or vertical tab. Whitespace is ignored, and the remaining bit count must be a nonzero multiple of eight. Prefixes, commas, underscores, and other separators are errors.
- Strict UTF-8
- Decoding stops on the first malformed byte sequence. It rejects stray or missing continuation bytes, invalid lead bytes, overlong forms, UTF-8 encodings of surrogate code points, and values above U+10FFFF. It never inserts a replacement character.
- Text preservation
- Valid text round-trips by Unicode scalar value. Tabs and spaces are preserved. Browser text controls normalize pasted CR and CRLF line endings to LF before JavaScript reads them.
- Limits and meaning
- Text input is limited to 20,000 UTF-16 units and binary input to 180,000 units. Binary here is a display of UTF-8 bytes, not encryption, compression, numeric base conversion, or translation.