Text to binary converter

Type any text and get its binary code as you go. "Hi" becomes 01001000 01101001. Letters, numbers, spaces, accents and emoji all convert, using UTF-8 by default. To decode binary instead, use the binary translator.

Binary to text

Show how each character converts
0 chars · 0 bytes · 0 bits
Reviewed byKhushboo Gupta
Last updated · How we test

Runs in your browser. Nothing you type is uploaded.

How to convert text to binary

  1. Type or paste your text in the left box.
  2. The binary shows up on the right as you type. Pick a separator (space, none, new line or comma) and a style: 8-bit, 7-bit, 4-bit groups or a 0b prefix.
  3. Copy the binary, download it as a .txt file, or press Share to send someone a link.

How text becomes binary

Every character has a number. In ASCII, capital A is 65, lowercase a is 97 and a space is 32. The converter writes that number in base 2 and pads it to 8 bits, so A becomes 01000001.

Converting the letter S to binary: its ASCII code is 83, which is 64 + 16 + 2 + 1, written in 8 bits as 01010011. The name Sam becomes 01010011 01100001 01101101.

Take the letter H. Its code is 72, and 72 is 64 + 8. Turn on the bits worth 64 and 8 and leave the rest at 0, and you get 01001000.

Characters outside ASCII take 2 to 4 bytes in UTF-8. The letter é becomes 11000011 10101001, and the 😀 emoji takes four bytes: 11110000 10011111 10011000 10000000. Open "Show how each character converts" under the tool to see this for your own text.

UTF-8 characters in binary: A is one byte 01000001, é is two bytes 11000011 10101001 and the euro sign is three bytes 11100010 10000010 10101100. The leading bits mark how many bytes each character uses.

The red bits in each byte are length markers. A leading 0 means a one-byte ASCII character, 110 starts a two-byte character, 1110 a three-byte one and 11110 a four-byte one such as an emoji. Every byte after the first starts with 10.

Common words and phrases in binary

TextBinary
Hi01001000 01101001
Hello01001000 01100101 01101100 01101100 01101111
Hello world01001000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100
Yes01011001 01100101 01110011
No01001110 01101111
Love01001100 01101111 01110110 01100101
I love you01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101
Thank you01010100 01101000 01100001 01101110 01101011 00100000 01111001 01101111 01110101

Numbers and punctuation in binary

Digits typed as text are not the same as numbers. The character 7 is ASCII code 55, so it becomes 00110111, not 111. For the binary value of a number, use the decimal to binary converter instead. The ASCII table lists the code for every character.

CharacterASCII codeBinary
04800110000
14900110001
25000110010
35100110011
45200110100
55300110101
65400110110
75500110111
85600111000
95700111001
space3200100000
!3300100001
,4400101100
.4600101110
?6300111111

7-bit vs 8-bit binary

ASCII only needs 7 bits, because its highest code is 127. Many textbooks and puzzles write letters in 7 bits, so H is 1001000. Computers store each character in a full 8-bit byte with the top bit set to 0, as RFC 20, the ASCII interchange standard describes, which is why the converter pads to 8 by default.

Pick 7-bit in the Style menu when an assignment asks for it. Accented letters and emoji need more than 7 bits, so the converter will tell you when a character does not fit.

Text to hex, decimal and octal

Set To to Hex, Decimal or Octal to get the same bytes in another base. "Hi" is 48 69 in hex, 72 105 in decimal and 110 151 in octal. Hex can also be written with a 0x or \x prefix for code.

Frequently asked questions

How do I write my name in binary?

Type your name in the box. Each letter becomes 8 bits, so "Sam" is 01010011 01100001 01101101. Capital and small letters give different codes.

Is text to binary the same as English to binary?

Yes. English letters are stored as ASCII codes, so converting English to binary means writing each letter's code in base 2.

How many bits is one letter?

8 bits in this converter. Plain ASCII needs only 7, while UTF-8 uses up to 4 bytes (32 bits) for emoji. To turn a long byte count into KB or MB, use the bytes to MB converter.

Why does my binary have spaces in it?

The spaces separate the bytes so they are easier to read. Choose None under Separator to get one continuous string.

How do I turn binary back into text?

Press the swap button next to From and To, or use the binary translator, which decodes binary to text.

Is my text sent to a server?

No. The conversion runs in your browser with JavaScript, and nothing you type is uploaded or stored.

Scroll to Top