Text to Binary and Back

Type text to see the bytes that store it as ones and zeros, or paste binary to read it as text. The Octal switch does the same with three digits per byte.

How it works

Text is turned into bytes with UTF-8, the encoding the web uses. Each byte is then written as 8 binary digits, from 00000000 to 11111111. Plain English letters take one byte each; é takes two and most emoji take four.

Octal writes the same bytes in base 8. A byte needs at most three octal digits, from 000 to 377, so H is 110 and i is 151.

Decoding reads groups split by spaces, commas or line breaks, and lets a group drop its leading zeros. One unbroken run of digits is read in fixed-size chunks instead, so it must be a whole number of bytes. Everything runs on this page.

How to use it

  1. 1 Choose Binary or Octal.
  2. 2 Pick Encode for text to digits, or Decode for digits to text.
  3. 3 Type or paste into the first box. The result appears as you type.
  4. 4 Copy the result or download it as a .txt file. Swap moves the result back into the first box and flips the direction.

Good to know

  • A space between bytes makes binary much easier to check by eye. Turn it off only when a puzzle or a form wants one long run.
  • If decoding says a run has the wrong number of bits, a digit was lost when it was copied. Count in groups of 8 to find where.
  • Binary that came out of a file, such as a picture, will not decode to text. The tool says so instead of printing junk.
  • This tool converts text. To convert a single number such as 255 to binary, use the number base converter.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Reading a word as ones and zeros, one byte at a time

Every character on a screen is stored as a number, and every number in a computer is stored as bits. This tool shows that last step. Type "Hi" and you get 01001000 01101001. That is two bytes, one per letter, and each byte is written as exactly 8 binary digits. The leading zeros are kept on purpose. A byte always has 8 bits, and keeping all 8 lets anyone count along and see where one byte stops and the next one starts.

Here is how the first byte works. H is character number 72 in ASCII and in Unicode. Write 72 as a sum of powers of two: 64 plus 8. In an 8-bit byte the places are worth 128, 64, 32, 16, 8, 4, 2 and 1. Put a 1 under 64 and under 8 and a 0 everywhere else, and you get 01001000. The letter i is 105, which is 64 plus 32 plus 8 plus 1, so it is 01101001. You can check any byte the same way with pencil and paper.

Letters outside plain English change the picture. Type "é" and you get 11000011 10101001: two bytes for one letter. UTF-8 marks the start of a two-byte character with the bits 110 and each byte that follows with 10. The bits left over carry the number 233, which is the code point of é. A three-byte character starts with 1110 and a four-byte one with 11110. Seeing those prefixes is a quick way to spot non-ASCII text in a dump of bits.

Octal is the same bytes in base 8. Each octal digit stands for three bits, so a byte needs three digits at most, from 000 for zero to 377 for 255. "Hi" becomes 110 151. Octal is rare in modern text work, but it still turns up in Unix file permissions, in old C and shell escape sequences such as \110, and in some puzzle hunts. The switch at the top of the tool changes every box between binary and octal, in both directions.

The tool has limits worth knowing. It converts text, not numbers: the number 255 is 11111111, but the text "255" is three characters and three bytes. It reads and writes UTF-8 only, so binary taken from a file saved in an old encoding such as Latin-1 may be reported as not being text. Bits from an image or a program are reported the same way, because they are not text. It takes up to a million characters at a time, so the page stays quick on a phone. Nothing you type leaves this page.

Frequently asked questions

What is "Hi" in binary?

H is character 72 and i is 105. In 8-bit binary those are 01001000 and 01101001, so "Hi" is 01001000 01101001. In octal it is 110 151.

Why does one letter sometimes take 16 or more bits?

Only the 128 ASCII characters fit in one UTF-8 byte. Letters with accents take two bytes, many Asian scripts take three, and emoji take four. So é is 11000011 10101001: two groups of 8 bits for one letter.

Can I paste binary without spaces?

Yes. One unbroken run is split into groups of 8 bits, or 3 digits for octal. The run must then be a whole number of bytes. With spaces, each group can be shorter, so 1001000 reads the same as 01001000.

Is this the same octal as chmod 755?

The digits are the same base, but the meaning differs. Here each group of three octal digits is one byte of text. In 755, each digit is a set of three permission bits. The chmod calculator explains those.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.