Binary ↔ text
Convert UTF-8 text and binary (0/1 bit strings)
Each group of eight bits represents a byte. Decode only 0, 1 and whitespace; characters such as Han ideographs can require multiple bytes.
Example
Input
Hi
Example result
01001000 01101001
H corresponds to decimal 72 and i to 105.
Technical details & limits
Every group of eight bits forms a byte from 0 to 255, which is then decoded as UTF-8. Only 0, 1 and whitespace are accepted, and the bit count must be divisible by eight. Output represents bytes rather than Unicode code points.
About this tool
Convert text to groups of eight UTF-8 bits and decode binary bytes back to text. Explore byte representation and non-ASCII encoding with concrete examples.
Use cases
- Illustrate character encoding while teaching.
- Debug a byte sequence that looks off on the wire.
How to use
- Paste text (or 0/1 bits) into the input.
- Click Encode for binary or Decode to restore text.
Notes
Only 0, 1 and whitespace are accepted. Other characters are rejected and the bit count must be divisible by eight.
FAQ
- Why does one Chinese character take three bytes?
- UTF-8 is variable-length; most Chinese characters take 3 bytes. This tool shows the actual UTF-8 bytes.
- Why can I not decode 1000001 directly?
- It contains seven bits. This tool expects complete bytes, so A should be written as 01000001.
- Can I omit spaces between binary bytes?
- Yes. If the total length is divisible by eight, it is split into eight-bit bytes.
- Can I treat the binary output as a single integer?
- The output is an ordered sequence of text bytes. Treating all bits as one integer loses the encoding and byte-boundary meaning; it is not the same as numeric base conversion.
Related tools