Puzzles, homework and old data dumps often hide text in 0s and 1s, and a binary to ASCII converter turns that string back into the characters it encodes. Each ASCII character is a number from 0 to 127, written in 7 or 8 bits, so decoding comes down to splitting the bits into groups and looking each number up. Paste binary above to see the text, and every character's code, as you type. Here's how binary to ASCII decoding works, and how to read ASCII binary without a table.
How binary becomes ASCII text
Decoding takes three steps. Split the binary into groups of 8 bits, one per character. Convert each group to a decimal number by adding the place values of its 1 bits: 128, 64, 32, 16, 8, 4, 2 and 1. Then find each number in the ASCII table. The binary 01001000 01101001 splits into 72 and 105, and those are the codes for H and i, so the message is Hi. Longer messages work the same way, one group at a time, and the character breakdown under the converter lists every group with its decimal and hex code so you can check each one.
Decoding a byte by hand
Take 01000011. Its 1 bits sit in the 64, 2 and 1 places, so the value is 64 + 2 + 1 = 67, the letter C. Do the same for 01100001, which is 64 + 32 + 1 = 97, or a, and for 01110100, which is 64 + 32 + 16 + 4 = 116, or t. Together the three bytes spell Cat. The binary to decimal converter shows this place-value working for any group of bits.
7-bit or 8-bit groups
ASCII codes need only 7 bits, so you'll sometimes see them without the leading 0: 1001000 1101001 is also Hi. When the groups are separated by spaces, this converter reads either form in any mode. The setting only matters for binary written without separators. In 8-bit mode, 0100100001101001 splits into two bytes. A 14-bit run like 10010001101001 can't be split into bytes, so switch to 7-bit and it reads Hi. Some lengths, such as 56 bits, divide into both 7s and 8s and decode to different text, so pick the width that matches your source.
Reading ASCII binary at a glance
The first three or four bits of an ASCII byte tell you what kind of character it is:
| Starts with | Codes | Characters |
|---|---|---|
| 000 | 0–31 | Control characters |
| 0010 | 32–47 | Space and ! " # $ % & ' ( ) * + , - . / |
| 0011 | 48–63 | Digits 0–9, then : ; < = > ? |
| 010 | 64–95 | @, uppercase A–Z, [ \ ] ^ _ |
| 011 | 96–127 | `, lowercase a–z, { | } ~ and DEL |
For letters, the last five bits are the position in the alphabet. 01011010 ends in 11010, which is 26, so it's Z. The third bit from the left is the case bit: it's 0 for uppercase and 1 for lowercase.
When the binary isn't ASCII
ASCII ends at 127, or 01111111, so every ASCII byte starts with 0. A byte that starts with 1 is 128 or more and has no meaning in ASCII. Usually it's part of UTF-8 text, where characters beyond ASCII take several bytes: 11000011 10101001 is the UTF-8 encoding of é. Older files may use an "extended ASCII" code page instead, such as Windows-1252, where the same byte can stand for a different character. Rather than guess, this converter stops and names the first value outside ASCII. For UTF-8, decode it with the binary to text converter.
Control characters in decoded text
Codes 0 to 31 and 127 are control characters. Some still do something useful: 00001010 (10) is a line feed that starts a new line, and 00001001 (9) is a tab. Others, like 00000000 (NUL) or 00000111 (BEL), were meant for old terminals and print nothing. They're still part of the decoded text even when you can't see them, so the character breakdown labels every one with its standard short name and meaning.
Decoding tricks
- Spaces, commas, semicolons and new lines all work as separators, and a
0bprefix on each group is ignored. - The copy button next to the output copies the decoded text exactly, control characters included.
- Switch between 8-bit and 7-bit at any time. The text and the breakdown update straight away.
- To go the other way, use the ASCII to binary converter.
- For the hex code of each character, try the text mode of the hex converter, or look it up in the ASCII table.
Stuck on a message? Check the first bit of each byte. If any byte starts with 1, it isn't ASCII, and the binary to text converter is the one to use.