This converter translates between human text and 8-bit binary. Encoding turns each UTF-8 byte of your text into a zero-padded group of eight bits; decoding reads such groups back into the original characters.
How it works
For encoding, the text is converted to UTF-8 bytes (via TextEncoder). Each
byte is a number from 0 to 255, written as eight binary digits:
byte 65 (A) -> 01000001
byte 32 ( ) -> 00100000
For decoding, all whitespace is removed and the remaining 0 and 1 characters
are split into groups of eight. Each group is parsed as a byte and the resulting
byte array is decoded as UTF-8 back into text.
ASCII vs. multibyte characters — what changes the output length
For plain English letters, digits, and common punctuation (characters in the ASCII range, 0–127), each character maps to exactly one byte and therefore one 8-bit group. The letter A is always 01000001. The digit 7 is always 00110111.
Characters outside the ASCII range — accented letters like é, Cyrillic, Arabic, CJK ideographs, and emoji — require more than one UTF-8 byte. The exact byte count depends on the Unicode code point:
| Character | Code point | UTF-8 bytes | Binary groups |
|---|---|---|---|
A | U+0041 | 1 | 01000001 |
é | U+00E9 | 2 | 11000011 10101001 |
€ | U+20AC | 3 | three 8-bit groups |
| emoji (e.g. ✓) | U+2713+ | 3–4 | three or four groups |
This is why converting an emoji to binary produces 24 or 32 bits, not 8.
Worked example: encoding “Hi!”
The three characters in Hi! are ASCII, so each maps to one byte:
H= 72 =01001000i= 105 =01101001!= 33 =00100001
Encoded result: 01001000 01101001 00100001
To verify: paste that string into the decoder and it returns Hi! exactly.
Decoding: what the tool checks
When you paste a binary string to decode, the tool:
- Strips all whitespace (spaces, newlines, tabs are ignored)
- Verifies that only
0and1characters remain - Checks that the total bit count is a multiple of 8
- Splits into 8-bit groups and converts each to a byte value
- Passes the byte array through
TextDecoderusing UTF-8
If any character other than 0 or 1 appears, or the bit count is not divisible by 8, the tool reports the specific problem rather than silently producing garbled output. This matters because dropping a bit from the middle of a multibyte sequence produces a completely different character — the error check prevents that.
Common uses
- CS education: visualising how characters are stored in memory, understanding character encoding
- Debugging encoding issues: checking the exact byte representation of an unusual character to confirm it is what you expect
- Puzzles and CTF challenges: binary-encoded messages are common in capture-the-flag competitions
- Data inspection: any situation where you need to see the raw byte pattern behind a string
The round trip is lossless — encoding then decoding returns the original text exactly, including spaces, punctuation, and Unicode characters — because UTF-8 is a reversible encoding.