Text and binary converter
Encode text as eight-bit binary groups of its UTF-8 bytes, or decode such groups back to text.
Your result
Your result will appear here.
About text and binary converter
Use this for computing lessons, puzzles or to show how text is stored. Text to binary writes each character as its UTF-8 bytes, in groups of 8 zeros and ones. You can see that A is 01000001 and that an accented letter takes 2 bytes. Binary to text reads such groups as bytes and turns them back into text, which decodes a message from a puzzle or checks a conversion you did by hand.
How it works
Text to binary takes the UTF-8 bytes of your text and writes each as 8 binary digits, padded with leading zeros, with a space between bytes. Characters outside basic English take 2 to 4 bytes, so they produce 2 to 4 groups. Binary to text splits the input at spaces and line breaks and checks that every group has exactly 8 binary digits. It then converts each group to a byte and decodes the bytes strictly as UTF-8.
Tips
- Spaces become 00100000 and line breaks 00001010, so they are visible in the result.
- In UTF-8, plain English characters start with 0, a group starting with 11 begins a multi-byte character, and groups starting with 10 continue it.
- For decoding, groups need all 8 digits: write 01001000, not 1001000. Unbroken strings of digits are rejected too.
- Separate groups with spaces or line breaks; commas are not accepted.
- A multi-byte character needs all of its groups in order. If 1 is missing, the bytes are not valid UTF-8 and the run stops.
Limits
Maximum 1 MB of input. Decoding needs groups of exactly 8 binary digits separated by spaces or line breaks, and the bytes must be UTF-8 text.
How tools run on your device →Questions and answers
How do I turn binary back into text?
Set Direction to Binary to text and paste the groups in place of the example. 01001000 01101001 gives Hi.
How do I read one group by hand?
From left to right, the digits stand for 128, 64, 32, 16, 8, 4, 2 and 1. Add the values where a 1 stands: 01000001 is 64 + 1 = 65, the code of the capital letter A.
Does it convert numbers to binary?
No. It converts the bytes of text, so the text 5 becomes 00110101, the code of the digit character. To write the number 5 in base 2, which is 101, use Number base converter.