Binary Code Translator

Text to binary and back, plus hexadecimal, decimal and octal. Runs entirely in your browser.

Input
Output
Characters 0 Words 0 Sentences 0 Lines 0 Reading time 0s

How text becomes binary

Every character has a number. The letter A is 65, B is 66, a space is 32. Writing those numbers in base two rather than base ten gives you binary: 65 becomes 01000001. That is the whole trick, and it is why the same tool can just as easily show the values in hexadecimal, decimal or octal, which are the same numbers written in a different base.

CharacterDecimalBinaryHex
A650100000141
a970110000161
0480011000030
space320010000020
!330010000121

Why eight digits

Eight bits make one byte, and the ASCII range that covers ordinary English text fits inside a byte. Padding every value to eight digits does two things: it keeps the output aligned so it is easier to read, and it makes the result decodable even if the separators are lost, because equal-width groups can be split apart again. Turn the padding off and short values lose their leading zeros, which is more compact but only decodable while the separators survive.

Characters beyond ASCII

Conversion works on Unicode code points, not on bytes, so an accented letter, a Greek character or an emoji becomes a single value and comes back as itself. Those values are larger than 255 and need more than eight digits, so the padding extends them rather than cutting them short. This is where a lot of converters quietly break: splitting a character into two halves gives two values that decode to nothing readable.

Decoding is forgiving

When decoding, anything that is not a digit of the chosen base is treated as a separator. Spaces, commas, line breaks, pipes and any mixture of them all work, so binary copied out of a forum post or a code comment usually decodes without being cleaned up first.

Input with no separators at all also decodes, provided every character used the same width: a continuous run whose length divides evenly by the group size is split back into equal groups. Where the widths were mixed there is genuinely no way to know where one character ends and the next begins, and separators are required.

How to use it

Type text and press Text to code, or paste code and press Code to text. The base and separator apply to the output when encoding and are ignored when decoding, since decoding accepts any separator. Copy result puts the output on your clipboard, Download .txt saves it, and Use result as input moves it back up so you can convert it a second time and check the round trip.

Questions

Why is each letter eight digits long?

Eight bits is one byte, and the ASCII range that covers ordinary English fits inside it. Padding every value to eight digits keeps the output aligned and, more usefully, makes it decodable even when the separators are lost, because the reader can split it back into equal groups.

Can it decode binary with no spaces?

Yes, as long as every character used the same width. A continuous run whose length divides evenly by the group size is split back into equal groups. Where the run has mixed widths there is no way to know where one character ends, so separators are needed.

Does it handle emoji and accented letters?

Yes. Conversion works on Unicode code points rather than on bytes, so an accented letter or an emoji becomes one value and comes back as itself. Those values need more than eight digits, so the padding extends rather than truncating them.

What separator should I use?

A space is the most readable and is what most tools expect. For decoding it does not matter: anything that is not a digit of the chosen base is treated as a separator, so spaces, commas, line breaks and mixtures of them all work.

Is my text sent to a server?

No. The conversion runs inside your browser and this tool has no backend, so nothing you paste is transmitted, logged or stored.