How text becomes binary
Every character has a number, its character code. Capital H is 72, lowercase i is 105 and a space is 32. Codes up to 127 fit in one byte, so the encoder writes each one in base 2, padded to 8 digits so that every byte has the same width. Codes above 127 take two to four bytes (see accented letters below).
The byte breakdown under the fields shows the same steps for your own text. Move the cursor through either field, or click a column, and the matching character is ringed.
Text to binary table
Codes and binary for the characters people look up most often:
| Character | Code | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| Z | 90 | 01011010 |
| a | 97 | 01100001 |
| z | 122 | 01111010 |
| 0 | 48 | 00110000 |
| 9 | 57 | 00111001 |
| Space | 32 | 00100000 |
| ! | 33 | 00100001 |
| . | 46 | 00101110 |
Letters run in order, so B is one more than A and C one more than B. Digits work the same way: the digit 0 is code 48, not the number 0.
Uppercase and lowercase
Each lowercase letter is exactly 32 more than its capital. In binary that is a single bit: A is 01000001 and a is 01100001. Only the third digit from the left changes.
7-bit or 8-bit binary
Plain English letters, digits and punctuation fit in 7 bits, because the original ASCII codes only go up to 127. Some textbooks and puzzles use 7-bit groups for that reason. Most of the time you want 8-bit groups, which match how computers store bytes.
The encoder writes 8-bit groups unless you choose 7. Curly quotes, accented letters and emoji do not fit in 7 bits. If your text has one, the output stays in 8-bit bytes and a note names the character.
Accented letters and emoji
Characters outside plain English, such as é, ł or an emoji, take more than one byte in UTF-8, the encoding used on the web. The encoder writes all of their bytes, so é becomes two groups:
Binary back to text
To read binary as text, open the Binary Translator. It also works out whether the groups are 7 or 8 bits long. If you need the bytes in a shorter form, the hex converter writes the same bytes with two characters each.
Questions about text to binary
How do I convert text to binary?
Type the text into the encoder above. Each character is replaced by its character code (A is 65, a space is 32), and each byte of that code is written as 8 binary digits. Letters, digits and punctuation take one byte. Accented letters and emoji take two to four bytes in UTF-8. By hand, you look up the code and break it into the place values 128, 64, 32, 16, 8, 4, 2 and 1.
What is "hello" in binary?
01101000 01100101 01101100 01101100 01101111. Each group is one letter: h is 104, e is 101, l is 108 and o is 111.
Why does every letter take 8 digits?
Computers store text in bytes, and a byte is 8 bits. Plain English letters only need 7 bits, so their first digit is always 0 in 8-bit form. Switch Bits to 7 if you need the shorter 7-bit groups.
Why are uppercase and lowercase letters different in binary?
They have different character codes. A is 65 (01000001) and a is 97 (01100001). The two differ in one bit, the one worth 32, and that is true for every letter of the alphabet.
How do I turn binary back into text?
Paste it into the Binary Translator. It reads binary back into text and works out whether the groups are 7 or 8 bits long.
Is my text sent to a server?
No. The conversion runs in your browser with JavaScript, and nothing you type leaves your device.