Skip to content
DeviceCheckHub

Binary Translator

Type text to see it in binary, or paste binary to read it as text. Below, convert numbers between decimal, binary, hex and octal.

3 bytes, 24 bits.

Number converter

Type a whole number in any box.

How to use the binary translator

  1. Type or paste text in the Text box. Its binary appears in the other box as you type, one group of eight bits per byte.
  2. To decode, paste binary in the Binary box. Spaces, commas or line breaks between bytes are fine; without them the bits are read in groups of eight.
  3. Untick Space between bytes for one unbroken string of bits, and press Copy binary to copy it.
  4. In the number converter, type a whole number in any of the four boxes to see it in the other three bases.

What binary is

Binary is a way of writing numbers using only two digits, 0 and 1. Computers use it because their circuits have two stable states, such as on and off, which map neatly onto 1 and 0. Each binary digit is a bit, and a group of eight bits is a byte, which can hold any of 256 values, from 00000000 (0) to 11111111 (255).

In our everyday decimal system each place is worth ten times the place to its right: ones, tens, hundreds. In binary each place is worth twice the one to its right: 1, 2, 4, 8, 16, 32, 64 and 128 for the eight bits of a byte. So 00001101 is 8 + 4 + 1 = 13, and 11111111 is all the place values added up, 255.

Counting in binary

Counting in binary works just like counting in decimal, except that you run out of digits after 1. Zero is 0, one is 1, and two needs a new place: 10. Then come 11 (three), 100 (four), 101 (five), 110 (six), 111 (seven) and 1000 (eight). Each time every place is 1, the next number adds a new place on the left, just as 99 becomes 100 in decimal. You can check any of these in the number converter above.

How text becomes binary

To store text, computers give every character a number and store that number in binary. For basic English letters, digits and punctuation, the numbers come from ASCII, a standard from the 1960s: capital A is 65, lowercase a is 97 and a space is 32. Uppercase and lowercase letters differ by exactly 32, a single bit, which is why A is 01000001 and a is 01100001.

CharacterDecimalBinary
A6501000001
B6601000010
C6701000011
a9701100001
b9801100010
c9901100011
04800110000
14900110001
space3200100000
!3300100001

ASCII only covers 128 characters, so modern systems use Unicode, which gives a number to well over a hundred thousand characters from the world’s writing systems, plus symbols and emoji. UTF-8 is the usual way to store those numbers as bytes, and it is what this translator uses unless you choose UTF-16 under Text encoding. ASCII characters stay a single byte, exactly as before, while other characters take two to four bytes: é is 11000011 10101001, and the grinning-face emoji 😀 is four bytes, 11110000 10011111 10011000 10000000.

UTF-16, used inside Windows, Java and JavaScript, stores most characters as two bytes instead. With Show bytes as set to Hexadecimal, “Hi!” is 48 69 21 in UTF-8 and 00 48 00 69 00 21 in UTF-16; é is C3 A9 in UTF-8 and 00 E9 in UTF-16, and 😀 is F0 9F 98 80 in UTF-8 but the pair D8 3D DE 00 in UTF-16. The same switch shows bytes in octal or as plain decimal numbers (72 105 33), and every format can be pasted back to read it as text.

Reading binary by hand

To turn a byte into a number, write the place values above its bits and add the ones that have a 1 below them. For 01001000, the 1s are under 64 and 8, so the byte is 72, which is capital H in ASCII. To go the other way, start with the largest place value that fits, write a 1, subtract it, and continue to the right, writing 0 wherever the value doesn’t fit. For 105: 64 fits (41 left), 32 fits (9 left), 16 doesn’t, 8 fits (1 left), 4 and 2 don’t, and 1 fits, giving 01101001, the letter i. Put the two together and you have “Hi” in binary.

Hexadecimal and octal

Long strings of bits are hard to read, so programmers often write them in hexadecimal, base 16, which uses the digits 0 to 9 and the letters A to F. Each hex digit stands for exactly four bits, so one byte is always two hex digits: 11111111 is FF and 01000001 is 41. You see hex in web colors such as #FF8800, in memory addresses and in error codes. Octal, base 8, groups bits in threes; it is less common today but still used for file permissions on Linux and macOS, such as 755.

The number converter handles whole numbers of any size and accepts the common prefixes 0b, 0x and 0o, so you can paste a value straight from code. Spaces, commas and underscores used as digit separators are ignored.

Binary in everyday tech

Fun ways to use binary

Like codes? The Morse code translator turns text into dots and dashes you can hear. For everyday math, try the scientific calculator.

Frequently asked questions

What is “hello” in binary?

In ASCII and UTF-8, “hello” is 01101000 01100101 01101100 01101100 01101111: one byte for each letter, h, e, l, l and o. A capital H would be 01001000 instead, because uppercase and lowercase letters have different codes.

Why does an emoji become 32 bits?

This translator uses UTF-8, the encoding used by almost every web page. Basic English letters take one byte, accented letters such as é take two, and most emoji take four bytes, which is 32 bits.

Can I paste binary without spaces?

Yes. If there are no spaces, the binary is read 8 bits at a time, so the number of digits must be a multiple of 8. With spaces, each group is one byte and leading zeros can be left out.

How do I convert binary to decimal by hand?

Write the place values 128, 64, 32, 16, 8, 4, 2 and 1 above the eight bits, then add the values where there is a 1. For 01000001 that is 64 + 1 = 65, which is the code for the letter A.

Is there a limit on number size?

No practical one. The number converter works with whole numbers of any length, far beyond the 16-digit limit of an ordinary calculator, so it is fine for 64-bit values, hashes and other long numbers.

Last updated · About DeviceCheckHub