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

Show the steps
  1. Each character has a number. UTF-8 stores it as one or more bytes, and each byte is written as 8 binary digits.
  2. H is 72, which is 01001000
  3. i is 105, which is 01101001

Put this converter on your site

Paste this into your page's HTML. The converter keeps the pair and settings it has now, and it runs in your reader's browser like it does here.

The credit line under the frame is optional. We'd be grateful if you kept it. How embedding works

Printable chart

Using the binary translator

Text on the left becomes binary on the right, eight digits to a byte. Swap the boxes with the arrows to go from binary back to English; spaces, commas and 0b prefixes 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. Lowercase a is 97: 01100001. The difference is 32, a single bit. ASCII's designers put the lowercase letters there on purpose, because one bit made case-insensitive matching easier and keyboards simpler to build.

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

Gottfried Leibniz published binary arithmetic in 1703, long before any computer, 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. Many early machines grouped bits in sixes. IBM chose eight for the System/360, announced 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.

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.

In the classroom

Ages 9 and up, about 30 minutes. Give five students a card each showing 16, 8, 4, 2 and 1 on one side and blank on the other. Call out a number and have them flip cards so the shown values add up to it: that row of cards, shown as 1 and blank as 0, is the number in binary.

Take it further: use the five cards to spell letters, with A as 1 up to Z as 26, then compare with the 8-bit codes computers use for text in the translator above. The binary alphabet chart prints for reference.

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, with nothing hidden.

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.

Sources

Added . Last updated and reviewed . What's new