Text to binary
Write text as ones and zeros, one 8-bit byte per group, in UTF-8 or ASCII.
Result
More octal, code points
Settings
Recent
Text turns into binary by encoding each character as bytes and writing each byte as eight bits. Type a short message and the bits appear in groups of eight, so the word Go becomes 01000111 01101111. UTF-8, UTF-16, EUC-KR and ASCII are all on offer, at no charge.
How to do it by hand
- Find the byte value of each character in the chosen encoding. In ASCII, A is 65.
- Write that byte in binary.
- Pad it on the left to eight digits, so 65 becomes 01000001.
- Leave a space between bytes so the message stays readable.
Worked examples
A
65 = 64 + 1
01000001
z
122 = 64 + 32 + 16 + 8 + 2
01111010
7 (the character)
55 = 32 + 16 + 4 + 2 + 1
00110111
Common mistakes
- Dropping the leading zeros. 1000001 and 01000001 are the same value, but a byte list is far easier to read at a fixed eight bits.
- Converting the character 7 as the number seven. As text, 7 is byte 55, which is 00110111.
- Assuming every character is eight bits. In UTF-8 a Korean syllable is 24 bits and most emoji are 32.
Characters as 8-bit binary
| Character | Decimal | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| a | 97 | 01100001 |
| b | 98 | 01100010 |
| c | 99 | 01100011 |
| 0 | 48 | 00110000 |
| 1 | 49 | 00110001 |
| (space) | 32 | 00100000 |
| ! | 33 | 00100001 |
| ? | 63 | 00111111 |
| @ | 64 | 01000000 |
| 가 (Korean, 3 bytes in UTF-8) | 234 176 128 | 11101010 10110000 10000000 |
Questions people ask
How do I turn binary back into text?
Switch the direction to code to text, pick binary as the input form and paste the bits with a space between bytes.
Why is a space not empty in binary?
A space is a character too. It is byte 32, written 00100000.
Can I get the bits without spaces?
Yes. Pick no separator and the bytes run together as one long string.