Back to the blog

Developer

Text to binary, a byte at a time.

Turn text into binary, eight digits a byte, or binary back into text, in your browser, with accents and emoji read as UTF-8. Nothing is uploaded.

By 3 min read

A developer toolkit reading encoded text in two steps, URL decode then Base64 decode, to give Hello, world!

Computers keep text as bytes, and a byte is eight binary digits. The Binary translator shows each one, and reads them back.

Eight digits a byte.

Type text and each byte is written as eight 0s and 1s, with a space between bytes. H is 01001000 and i is 01101001, so Hi is 01001000 01101001.

Paste binary to read it back. Spaces and line breaks are passed over, so the digits can come in one run; they must make whole bytes, and when they do not, the page says how many digits are left over.

Accents and emoji take more than one byte.

Text is written as UTF-8, as web pages and most files keep it. Plain English letters take one byte each, the same as in ASCII; é takes two, so café is five bytes: 01100011 01100001 01100110 11000011 10101001.

Emoji and many scripts take three or four bytes each. To see which bytes belong to which character, open the Unicode converter.

One step in a recipe.

Binary is a step of the Developer toolkit, so it can follow another: decode Base64, then show its bytes in binary. Each step names the one that undoes it.

Binary digits are only 0 and 1. Anything else, such as a 2 or a letter, stops the reading and is named, rather than being passed over.

This turns text into bytes. To write a number such as 255 in binary, 11111111, use Hex to decimal, which converts numbers between bases.

Nothing leaves your browser.

Everything is worked out on your device: what you type or paste is never sent anywhere, and nothing is kept when you leave.

The same toolkit has a page each for Morse code, Roman numerals and Unix time.

Further reading

Topics: text to binary · binary to text · binary translator · binary code · utf-8 to binary · ascii to binary · binary converter

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool