TanodTools

Text to binary converter

Turn text into binary code, or decode binary back into readable text. Works with any language and emoji.

Runs entirely in your browser

Convert

Type text to begin.

Text up to 1 MB to encode; binary up to 5 MB to decode. The result updates as you type.

How to convert text to binary

  1. Choose Text to binary or Binary to text.
  2. Type or paste into the box. The result appears as you type.
  3. Copy the result or download it as a .txt file. Use Swap to convert the result back.

How text becomes ones and zeros

Computers store text as numbers. An encoding decides which number each character gets; this tool uses UTF-8, which is what nearly every web page, email and modern file uses. UTF-8 stores the first 128 characters (the English alphabet, digits and common punctuation) in one byte each, with the same values as the older ASCII code. Other characters take two to four bytes: é is 11000011 10101001 and the emoji 😀 is four bytes.

A byte is eight bits, so each byte is shown as eight binary digits, with leading zeros kept so every group is the same width. That makes the output easy to read back: each group of eight is one byte.

To decode, the tool reads each group as a byte, then reads the bytes as UTF-8 text. If the bytes don't form valid UTF-8, it says where the problem starts instead of showing garbled characters.

Tips

Questions

How is text turned into binary?

Each character is first turned into bytes with UTF-8, the encoding the web uses, and each byte is written as eight binary digits. The letter A is byte 65, which is 01000001. Plain English letters take one byte each; accented letters take two bytes, and most emoji take four.

Is this the same as ASCII to binary?

For plain English letters, digits and punctuation, yes: UTF-8 gives those characters the same byte values as ASCII. The difference only shows for other characters, which ASCII cannot represent at all.

What binary input can it decode?

Groups of up to eight 0s and 1s separated by spaces, commas or line breaks, one group per byte, or one unbroken run of digits whose length is a multiple of eight. Anything else, such as a 2 or a letter, is reported with its position so you can fix it.

Why does decoding say the bytes aren't valid UTF-8?

Not every sequence of bytes is valid text. A byte may be missing or extra, or the binary may come from an older encoding or from a file that isn't text. The message points to the first byte that can't be read. Check that no group was lost when the binary was copied.

What are the hex, decimal and octal options?

They write the same bytes in another number base: hex uses two digits 0-9 and a-f per byte (A is 41), decimal uses 0 to 255 (A is 65) and octal uses 0 to 377 (A is 101). Decoding accepts the same base you pick.

Is my text uploaded?

No. The conversion runs in your browser, and the text is not uploaded or stored.