Cipher Utility

Binary Translator

E-07

Binary to text and text to binary. Runs in your browser; nothing is sent anywhere.

Bits:

Byte breakdown

Each character with its decimal code, hexadecimal bytes and binary bytes. Select a column to mark it.
Char
Dec
Hex
Bin

How to read binary by hand

  1. Binary is base 2.
    Each position is a power of 2.
  2. Write the place values above the bits.
  3. When a bit is 1, add its place value.
  4. The total is the decimal value.
  5. Match the decimal value to the character code table.

Worked example

01001000 = ?

Add the values where the bit is 1:

64  +  8  =  72

01001000 = 64 + 8 = 72 = H

Cipher Utility reference card Catalog no. E-07

How the binary translator works

Computers store text as numbers. Every character has a code (H is 72, a space is 32), and binary is that code written in base 2. Translating binary to text means cutting the digits into groups, reading each group as a number and looking the number up. Going from text to binary runs the same steps backwards.

The translator does both. Paste binary and you get text; switch the direction and type text to get binary. The byte breakdown under the fields shows every character with its decimal code, its hex bytes and its binary bytes, so you can check any single group by eye. Click a column, or move the cursor in either field, and the matching column is ringed.

01001000 → 72 → H 01100101 → 101 → e 01101100 → 108 → l 01101100 → 108 → l 01101111 → 111 → o

Binary to text reference table

The values you meet most often when reading a string of 1s and 0s:

BinaryDecimalCharacterNote
0010000032SpaceSeparates words
00110000480Digits run from 48 to 57
0100000165AUppercase starts here
0101101090ZLast uppercase letter
0110000197aLowercase starts here
01111010122zLast lowercase letter
0010111046.Full stop
0100000064@Just before A
0000101010NewlineLine break

A quick rule of thumb: a group that starts with 010 is usually an uppercase letter, and one that starts with 011 is usually lowercase.

Converting text to binary

Pick Text → Binary and type. Each character is replaced by its code, written as an 8-bit group with leading zeros, and the groups are separated by spaces. The letter A is 65, which is 01000001. A space is 32, or 00100000.

Letters outside plain English, such as é or €, need more than one byte in UTF-8, so they come out as two, three or four groups. The breakdown table shows which groups belong to which character. If you set the bits to 7, the translator writes 7-bit groups, which only works for ASCII characters (codes 0 to 127).

7-bit and 8-bit binary

Original ASCII is a 7-bit code covering 0 to 127. Modern systems store one character per 8-bit byte and set the extra leading bit to 0 for anything in the ASCII range. That is why 8-bit groups cover almost everything you will find online.

Bare 7-bit groups still show up in older serial and telecom formats, in some coursework and in puzzles written by hand. A 7-bit group has no room for the leading zero, so 1001000 and 01001000 both mean H.

To tell them apart, look at the separators first. If the string is split into groups, the number of digits in one group is your answer. Without separators, count the total: a length that divides by 8 but not by 7 is 8-bit, and one that divides by 7 but not by 8 is 7-bit. A length such as 56 fits both, and then 8-bit is the safer guess because almost every tool produces it. The Auto setting follows these rules in that order and shows the width it picked next to the input label.

Binary and UTF-8

ASCII stops at 127. Accented letters, currency symbols, other alphabets and emoji are stored as UTF-8, which uses two, three or four bytes per character. The leading bits of each byte tell you how the bytes fit together: a byte starting with 0 stands alone, 110 opens a two-byte character, 1110 a three-byte one and 11110 a four-byte one. Bytes that continue a character always start with 10.

11100010 → starts with 1110: a 3-byte character begins 10000010 → starts with 10: continuation byte 10101100 → starts with 10: continuation byte Together: €

The translator handles this in 8-bit mode. 7-bit mode cannot, because none of its values go above 127.

Separators and formatting

Binary turns up in many shapes. The translator removes everything except 0 and 1 before it reads the groups, so all of these give the same word:

01001000 01101001 01001000-01101001 01001000,01101001 0100100001101001 All four give: Hi

Line breaks and indentation are fine too, which helps when you copy binary out of a PDF or a code listing. The only thing that changes the result is the group size, and that is what the Bits setting controls.

When binary will not translate

The digit count does not divide evenly

This is the usual cause. A digit was lost in copying or an extra one crept in. The error message tells you how many digits you have and how many are left over, which is normally enough to find where the string was cut.

It is hexadecimal

Binary only uses 0 and 1. A string with the digits 2 to 9 or the letters a to f is hex, and the translator warns you that it skipped those characters. Use the hex decoder instead.

You have a .bin file

A file with a .bin extension holds machine data such as firmware or a disk image. It is not text written out as 0s and 1s, so there is nothing here to translate. Open it in a hex viewer.

The result looks like noise

If every group translates but the text makes no sense, the message was probably encrypted before it was written in binary. Translating it only gets you back to the encrypted text, and you need the right cipher and key for the next step. Puzzle messages often use a Caesar shift or ROT13.

Some characters show as a black diamond

That symbol marks bytes that are not valid UTF-8. Part of the string is usually missing or the group size is wrong. The translator keeps everything it could read and tells you how many groups failed.

Binary, hex and Base64 compared

These three formats appear in similar places and are easy to mix up. You can tell them apart by the characters they use:

FormatCharacters used"Hi" looks like
Binary0 and 101001000 01101001
Hexadecimal0 to 9 and a to f48 69
Base64Letters, digits, + and /, often ending in =SGk=

Questions about binary translation

How do I translate binary to text?

Split the digits into groups of 8 and read each group as a number by adding the place values 128, 64, 32, 16, 8, 4, 2 and 1 wherever a 1 appears. Then look the number up in an ASCII table: 72 is H, 101 is e, and so on. Paste the binary into the translator above and it does all of this as you type.

How do I convert text to binary?

Switch the translator to Text to Binary and type your text. Each character is turned into its character code and written as an 8-bit group, so A becomes 01000001 and a space becomes 00100000.

Is my binary 7-bit or 8-bit?

Count the digits in one group if the string has separators. Without separators, look at the total: a length that divides by 8 but not by 7 is 8-bit, and the other way round means 7-bit. When it divides by both, 8-bit is the safer guess. The Auto setting follows these rules.

Why is my binary not a multiple of 8?

Usually a digit was dropped or doubled while copying. The translator tells you how many digits are left over, which normally points straight at the break. The string may also be genuine 7-bit binary.

Does it handle accented letters and emoji?

Yes, in 8-bit mode. Those characters take two to four bytes in UTF-8 and the translator puts the bytes back together. 7-bit mode only covers plain ASCII.

Is binary code a kind of encryption?

No. Binary is a way of writing data down, and anyone can read it back without a key. If the translated text still looks like noise, it was encrypted before it was written out in binary.

Is my text sent to a server?

No. The translation runs in your browser with JavaScript, and nothing you paste or type leaves your device.