Binary to text: decoding bytes, and knowing when you cannot
What this conversion does
It reads a sequence of binary bytes and decodes them as UTF-8 text. Eight bits make one byte, then the bytes are decoded together, because a single character may occupy several of them. The decoding step is where the real work is: the byte boundaries tell you nothing about the character boundaries.
How a decoder knows where characters end
The leading bits of each byte announce its role. A byte starting with 0 stands alone, one starting with 110 opens a two-byte character, 1110 opens a three-byte character and 11110 opens a four-byte one, while continuation bytes start with 10. That structure is what lets a decoder walk a stream without being told where the characters are, and it is also what makes a stream that has been cut in the wrong place detectable.
Binary to text conversion table
Byte sequences with the text they decode to. The multi-byte rows show the leading-bit pattern doing its job, and the last row shows what raw bytes that are not printable text look like.
| Binary | Text |
|---|---|
| 01000001 | A |
| 01100001 | a |
| 01001000 01101001 | Hi |
| 01001111 01001011 | OK |
| 00110001 00110010 00110011 | 123 |
| 11100100 10111000 10101101 | 中 |
Where mojibake comes from
Mangled text nearly always means the bytes were decoded with the wrong encoding or cut at the wrong offset. Decoding UTF-8 as if it were a single-byte encoding turns a three-byte character into three unrelated symbols, and dropping one byte from the front shifts every following character. Both failures look like random punctuation, and both are diagnosed by looking at the bytes rather than the characters.
Keep the byte grouping intact
Copy complete groups of eight digits. Starting a paste from the middle of a byte produces a sequence the decoder cannot make sense of, and the error that follows is accurate but not obviously about where the paste began.
Frequently asked questions
How do I decode binary back into text?
Split the binary into groups of eight digits, treat each group as one byte, and decode the bytes as UTF-8. The letter A is 01000001, so a single group decodes to a single character; a longer sequence decodes to a longer string, with some characters spanning several groups.
Why do I get an error instead of strange characters?
Because the byte sequence is not valid UTF-8 — it may be cut short, out of order, or not text at all. Refusing it is deliberate: the alternative is to substitute replacement characters, which produces output that looks like a decoding problem even when the real problem is that the bytes were never text.
Can I paste binary without spaces between the bytes?
Yes. A continuous run whose length is a multiple of eight is split into bytes automatically, so binary copied from a source that omits separators converts without being reformatted first. Spaced and unspaced forms mean the same thing.
What does a byte above 127 mean on its own?
That it is part of a multi-byte character rather than a character in itself. A lone byte in that range has no valid UTF-8 meaning and is rejected, which is the correct response — the character it belonged to is incomplete.
Does this work for text in any language?
Yes, for anything UTF-8 can represent, which is essentially every writing system in current use, including accented Latin alphabets, Cyrillic, Arabic, Chinese, Japanese, Korean and emoji. A sequence produced by the text to binary tool on this site will always decode back to exactly the text you started with.