Binary to Text Converter

Paste binary code and read it as text. Spaces between bytes are optional: groups are detected automatically, missing leading zeros are handled, and multi-byte UTF-8 characters such as é, € and emoji decode correctly. Switch direction to turn text into binary. Everything runs in your browser.

Text

        

How to convert binary to text

  1. Paste the binary into the left box. 01001000 01101001, 0100100001101001 and 0b1001000 0b1101001 all work.
  2. The text appears on the right as you type. Leave Character set on UTF-8 unless you know the data uses an older single-byte encoding.
  3. Check the byte table under the tool if the output looks wrong: it shows every group as binary, decimal, hex and the character it produced.

Spaces, commas, line breaks and pipes between groups are all treated as separators. If there are no separators at all, the input is cut into groups of eight from the left. If you paste a long run of 7-bit groups (for example from a textbook that prints ASCII without the leading zero), the tool notices that every group is seven digits and decodes them as 7-bit ASCII.

How binary becomes a letter

Computers store text as numbers, and binary is just a way of writing those numbers with two digits. One group of eight bits is a byte, which can hold a value from 0 to 255. Each position in the byte has a fixed value, doubling from right to left:

Bit position1286432168421Total
010010000100100064 + 8 = 72
011010010110100164 + 32 + 8 + 1 = 105

Add up the positions that hold a 1 and you have the byte's value. Then look the value up in the character table: 72 is H and 105 is i, so 01001000 01101001 reads “Hi”. That lookup table is ASCII for the first 128 values, and UTF-8 builds on it for everything else.

Binary alphabet: common ASCII characters

Uppercase letters start at 01000001 (65) and lowercase letters start at 01100001 (97). The only difference between a capital and a small letter is the bit worth 32, which is why A and a differ by exactly one digit.

CharBinaryDecCharBinaryDecCharBinaryDec
A0100000165a011000019700011000048
B0100001066b011000109810011000149
C0100001167c011000119990011100157
H0100100072h01101000104space0010000032
I0100100173i01101001105!0010000133
O0100111179o01101111111.0010111046
Z0101101090z01111010122newline0000101010

So “Hello” in binary is 01001000 01100101 01101100 01101100 01101111. Digits are not their own value: the character 7 is stored as 55 (00110111), not as 7.

Characters outside ASCII: UTF-8

ASCII only covers 128 characters. Accented letters, other alphabets, symbols and emoji are stored with UTF-8, which uses two to four bytes per character. The first byte says how many bytes follow:

CharacterBytesBinary
é211000011 10101001
€311100010 10000010 10101100
😀411110000 10011111 10011000 10000000

A byte starting 110 opens a two-byte character, 1110 a three-byte one and 11110 a four-byte one; every continuation byte starts with 10. If you decode these bytes one at a time as Latin-1 you get gibberish such as é instead of é, which is the classic “mojibake” you see on badly configured websites. This converter decodes UTF-8 by default and tells you if the bytes are not valid UTF-8, in which case switching to Latin-1 usually gives the intended text.

Why the output looks wrong, and how to fix it

Every character after a certain point is garbage

A digit was dropped or added somewhere, so all the following groups are shifted. This happens when binary without spaces is copied with a missing leading zero. Add separators by hand around the suspicious area, or look at the byte table to find the first group whose value is out of the expected range.

The text is close but letters are wrong

Your groups are probably seven bits long. Classic ASCII needs only seven bits, and some sources print 1001000 instead of 01001000. Set Bits per character to 7.

“Not valid UTF-8”

The bytes are not a valid UTF-8 sequence. Either the binary is damaged, or it was produced with a single-byte encoding such as Windows-1252 or ISO-8859-1. Choose Latin-1 to decode each byte as one character.

The input is really hex, octal or decimal

Binary only contains 0 and 1. If your data has digits 2–9 or letters A–F, use the hex to text converter or the ASCII to text converter for decimal codes.

Convert binary to text in code

Python, decoding UTF-8 bytes:

bits = "01001000 01101001"
text = bytes(int(b, 2) for b in bits.split()).decode("utf-8")
print(text)  # Hi

# and back again
print(" ".join(f"{b:08b}" for b in "Hi".encode("utf-8")))

JavaScript, in the browser or Node.js:

const bits = "01001000 01101001";
const bytes = new Uint8Array(bits.trim().split(/\s+/).map(b => parseInt(b, 2)));
console.log(new TextDecoder().decode(bytes)); // Hi

// text to binary
const back = [...new TextEncoder().encode("Hi")]
  .map(b => b.toString(2).padStart(8, "0")).join(" ");

Using chr(int(b, 2)) on each group, which many short tutorials suggest, only works for plain ASCII. It turns each byte of a multi-byte character into a separate wrong character, so 11000011 10101001 becomes é instead of é.

Privacy

The conversion is done by JavaScript in this page. Nothing you paste is uploaded or logged, so it is safe to decode binary from logs, packet captures or homework without it leaving your machine.

Frequently asked questions

How do I convert binary to text?

Split the binary into 8-bit groups, convert each group to a number (add 128, 64, 32, 16, 8, 4, 2, 1 for each position holding a 1), then look each number up in the ASCII/UTF-8 table. This converter does all three steps when you paste the binary.

What does 01001000 01101001 mean in binary?

It means “Hi”. 01001000 is 72, the code for H, and 01101001 is 105, the code for i.

Do I need spaces between the bytes?

No. Without spaces the input is split into groups of eight from the left. Spaces only matter if some groups are missing a leading zero, because then the grouping becomes ambiguous.

Why do I get strange characters like é instead of é?

The bytes are UTF-8 but were decoded one byte at a time as Latin-1. Keep the character set on UTF-8, which reads é as the two bytes 11000011 10101001.

Can I convert text to binary here too?

Yes. Click Text → Binary, type your text and choose a separator. Each character is encoded as UTF-8, so non-English characters produce two to four bytes.

What is the difference between 7-bit and 8-bit binary?

Original ASCII uses 7 bits (values 0 to 127). Modern systems store each character in at least one 8-bit byte, so the leading bit is 0 for ASCII. Some textbooks drop that leading 0; set Bits per character to 7 for that kind of input.

Is binary the same as machine code?

No. Text-as-binary is simply character codes written in base 2. Machine code is also binary, but it encodes processor instructions, and decoding it as text produces meaningless characters.