Skip to content
AgileLogics

Text to Binary

Converts text to the 8-bit binary of its UTF-8 bytes, or decodes space-separated 8-bit binary bytes back to text.

How it works

Type or paste your input, choose a direction, and click Convert.

What is text to binary conversion?

Text to binary conversion writes a text as the base-2 bytes a computer uses to store it. This tool encodes the text as UTF-8 and shows each byte as a group of eight ones and zeros. An English letter is one byte, so one group; an accented letter or emoji is two to four. The reverse mode turns those groups back into readable text.

Computers have no idea what an "H" is. They store the number 72, defined for that letter by the ASCII standard, and the bits 01001000 are that number written in binary. Unicode extends the same idea to every writing system, with ASCII as its first 128 codes.

How to use the converter

  1. Choose a Direction: Text → Binary or Binary → Text.
  2. Type or paste your input.
  3. Click Convert and copy the result.

In Binary → Text mode, separate each byte with a space or a line break. Groups can be up to 8 digits long and don't need leading zeros.

Worked example

Converting Hi! gives 01001000 01101001 00100001:

Character Decimal code Binary
H 72 01001000
i 105 01101001
! 33 00100001

To read a binary group, add up the place values of its 1s. From the left, the eight positions are worth 128, 64, 32, 16, 8, 4, 2 and 1. 01001000 has 1s in the 64 and 8 positions, and 64 + 8 = 72, which is H.

Paste 01001000 01101001 00100001 back in with Binary → Text selected and you get Hi! again. 1001000 1101001 (no leading zeros) decodes to Hi as well.

Characters worth knowing

Character Binary Note
Space 00100000 Code 32, the most common byte in English text
Line break 00001010 Code 10, line feed
0 00110000 Digits start at code 48, so the digit 0 isn't 00000000
A 01000001 Uppercase letters run from 65 to 90
a 01100001 Lowercase is uppercase plus 32, one extra bit

That last row explains a classic trick: upper and lowercase ASCII letters differ by a single bit, the one worth 32.

Accents, symbols and emoji

Text is encoded as UTF-8, the encoding used by almost every web page and text file, so the output matches a byte-level dump of a UTF-8 file. The 128 ASCII characters are one byte each, and every other character takes two to four bytes:

Input Code point UTF-8 bytes in binary
é U+00E9 11000011 10101001
€ U+20AC 11100010 10000010 10101100
👍 U+1F44D 11110000 10011111 10010001 10001101

You can spot the structure in the bits. A lead byte starting 110 begins a two-byte character, 1110 a three-byte one and 11110 a four-byte one, and every continuation byte starts with 10. So café becomes five groups, not four: 01100011 01100001 01100110 11000011 10101001.

Reverse mode collects all the bytes and decodes them as UTF-8, so 11000011 10101001 comes back as é. If the bytes don't form valid UTF-8, it shows an error rather than guessing. Two common causes:

  • A multi-byte character is cut short. 11000011 on its own is the first half of é.
  • The binary came from a Latin-1 converter that writes é as the single byte 11101001. That byte isn't valid UTF-8 by itself.

For text you converted here, round trips are always exact.

Errors and fixes

Input What happens Fix
0100100001101001 Error: one 16-digit group Add a space every 8 digits
01001000,01101001 Error: comma isn't a separator Use spaces or line breaks between groups
010010000 Error: 9 digits Check for a stray extra digit
01001000 2 Error: not binary Only 0 and 1 are allowed
11000011 Error: not valid UTF-8 Include every byte of a multi-byte character

Related tools

  • Base64 encoder: a compact way to carry bytes as text, used in email and data URLs.
  • Base64 decoder: turn Base64 back into readable UTF-8 text.
  • URL encoder: see the UTF-8 bytes of accented characters and emoji as %XX hex codes.

Last updated

Frequently asked questions

How is each character converted to binary?
The tool encodes your text as UTF-8 and writes each byte as an 8-digit binary group. Plain English letters, digits and punctuation are one byte each, equal to their ASCII code, so H is 72, which is 01001000. Accented letters and emoji take two to four bytes, so they produce two to four groups.
What format does Binary to Text accept?
Groups of 1 to 8 binary digits separated by spaces or line breaks, such as 01001000 01101001. Leading zeros are optional, so 1001000 also works. A long run of bits with no spaces, commas between groups, or any group longer than 8 digits is rejected.
Does it use UTF-8 for accents and emoji?
Yes. é becomes two bytes, 11000011 10101001, and € becomes three, 11100010 10000010 10101100, exactly what a UTF-8 file stores. Binary to Text decodes those bytes back to é and €. If the bytes aren't valid UTF-8, for example a multi-byte character with a byte missing, you get an error instead of garbled text.
Are spaces and line breaks converted?
Yes. A space becomes 00100000 and a line break becomes 00001010, so they survive a round trip from text to binary and back.
Is my text sent anywhere?
No. The conversion runs in JavaScript on this page, so nothing you type leaves your browser.