Codec lesson · Binary UTF-8
Binary: see the bytes behind your text
Encode Keyboard represents every UTF-8 byte as eight zeroes and ones. That means English, Vietnamese, and emoji all work — but one visible character may use several bytes.
Completed in this browser
Encode Keyboard represents every UTF-8 byte as eight zeroes and ones. That means English, Vietnamese, and emoji all work — but one visible character may use several bytes.
Binary is a numeral representation. Encode Keyboard first turns text into UTF-8 bytes, then writes each byte as an 8-bit value. Spaces between bytes are for readability and are optional when decoding.
How Encode Keyboard handles it
Text becomes UTF-8
Every Unicode string is converted to its standard UTF-8 byte sequence.
Each byte becomes 8 bits
A byte from 0 to 255 is padded to exactly eight binary digits.
Decode validates the result
Only 0 and 1 are accepted, the bit count must divide by eight, and the bytes must form valid UTF-8 text.
Worked example
Hi01001000 01101001H is byte 72 and i is byte 105; their 8-bit forms are shown above.
Good uses
- Learning how text is stored as bytes
- Sharing readable bit patterns
- Checking UTF-8 byte boundaries
Validation and common errors
- Binary output is much longer than the source
- A single changed bit can invalidate or alter decoded text
- It provides no secrecy
Practice in your browser
This uses the same documented rules as the app and runs only in this tab.