StringMash.com

Binary code translator

Turn text into 0s and 1s, or read binary back into words.

Conversion
2 characters
Updates as you type
8 digits per byte

Using the binary translator

Type text on the left and binary appears on the right, eight digits to a byte. That covers both directions people ask for, English to binary going one way and binary to English coming back. Swap the boxes with the arrows; spaces and commas are ignored when decoding, so an unbroken run of digits works as well as neat groups.

Separator changes what sits between bytes in the output. Set it to none when you're pasting into code rather than into a message.

How text becomes binary

Every character has a number in the Unicode table. Write that number in base 2, pad it to eight digits, and you have a byte. Capital A is 65: 01000001. Lower-case a is 97: 01100001. The difference is 32, a single bit, and that was designed in so a machine could change case by flipping one wire.

Characters past the first 128 need more than one byte. UTF-8 spends two on most accented letters, three on most symbols and CJK characters, and four on an emoji. One of those produces 32 digits.

A–Z AND 0–9

Binary alphabet

A01000001
B01000010
C01000011
D01000100
E01000101
F01000110
G01000111
H01001000
I01001001
J01001010
K01001011
L01001100
M01001101
N01001110
O01001111
P01010000
Q01010001
R01010010
S01010011
T01010100
U01010101
V01010110
W01010111
X01011000
Y01011001
Z01011010
000110000
100110001
200110010
300110011
400110100
500110101
600110110
700110111
800111000
900111001

Leibniz, and why a byte is eight

Binary arithmetic is far older than any computer. Gottfried Leibniz published it in 1703, and he wasn't chasing an application: he took a system where everything could be written with 1 and 0 as a demonstration of creation out of nothing.

The eight-bit byte is much newer and much more arbitrary. Early machines grouped bits in sixes and sevens. IBM's System/360 settled on eight in 1964 because it held two decimal digits neatly and left room for a bigger character set, and the industry followed. Nothing in nature requires it, which is worth remembering the next time a decode fails because the digits don't divide evenly.

Related conversions

Binary is the most verbose way to write bytes down. Base64 and hexadecimal carry the same bytes in far fewer characters, and they're what you meet in real files and headers.

For the number of each character rather than its bytes, use character codes or Unicode code points. And Morse builds a whole alphabet out of two states, the same way a byte does.

Questions

Why must the digits divide by eight?

A byte is eight bits. A leftover group is an incomplete character, so the converter says so instead of guessing.

Can I use binary without spaces?

Yes. Spaces and commas are ignored when decoding.

Is binary a code or a cipher?

Neither. It's how text is written down inside a machine, not an attempt to hide it.

Why does my emoji produce so many digits?

UTF-8 spends four bytes on it, which is 32 binary digits for one character.

How do I translate binary to English?

Paste the binary into the left box and press the swap arrows, or pick Binary under From. Groups of eight digits become one character each, and spaces between groups are optional.