Binary / ASCII Translator

Convert text to 8-bit binary and binary back to ASCII text instantly. Free online tool, no signup, runs in your browser.

Preparing private browser tool…

Your file will stay on this device.

How text becomes binary

Every character a computer stores is a number, and binary is that number written in base 2. ASCII assigns the numbers 0 to 127 to the Latin letters, digits, punctuation and a set of control characters, so the capital A is 65, the lowercase a is 97, the digit 0 is 48 and the space is 32. Written in base 2 and padded to eight bits, A is 01000001 and a is 01100001.

The single bit of difference between those two is not a coincidence. Uppercase and lowercase letters in ASCII are separated by exactly 32, which is 2 to the power 5, so the case of a letter is the sixth bit. Flipping that one bit converts between cases, which is why case conversion used to be written as a bitwise operation. Similarly, the ASCII value of a digit character is its numeric value plus 48, so subtracting 48 from the character 7 gives the number 7.

Encoding the word Hi therefore gives 01001000 01101001: 72 for H and 105 for i. This tool writes one group per character, separated by a space, which keeps the output readable and unambiguous. Without a separator the boundaries are recoverable only if every group is the same width.

What happens to characters beyond ASCII

The tool reads each unit of the string and writes its numeric value in binary, padded to a minimum of eight digits. For ASCII text that always gives exactly eight bits per character. For anything above 127 the value simply needs more digits: the Korean syllable at U+D55C comes out as sixteen binary digits rather than eight, and so does an accented Latin letter above the ASCII range.

This is a code unit view rather than a byte view, and the difference matters for anything outside the basic multilingual plane. Emoji and other characters above U+FFFF are stored as a surrogate pair of two units, so they produce two groups rather than one, each in the surrogate range. Decoding those two groups reassembles the original character correctly, but the groups themselves do not correspond to what a UTF-8 encoder would produce.

So if you need the actual bytes a file or a network packet would contain, this is not the right representation. UTF-8 encodes the same Korean syllable as three bytes, 11101101 10010101 10011100, which looks nothing like the sixteen-digit group shown here. For ASCII-only text the two views coincide exactly, which is why the distinction rarely comes up in practice.

Decoding binary back to text

In the other direction the tool splits your input on whitespace, checks that every group contains only the digits 0 and 1, parses each as a base 2 number and maps it back to a character. A group containing anything else, including a stray 2 or a hyphen, makes the whole input invalid rather than silently producing garbage, which is deliberate: a partially decoded binary string is worse than a clear error.

Group width is flexible. 1001000 and 01001000 both decode to H, because leading zeros do not change the value. That tolerance is useful when pasting binary from a source that trimmed padding, and it is why the separator matters so much: without spaces there is no way to know where one character ends and the next begins.

Line breaks and multiple spaces are treated as ordinary separators, so binary copied from a formatted document with wrapped lines decodes without cleanup. The decoder does not skip non-binary junk, so remove any labels or commas before pasting.

Where binary representation is actually useful

The most common practical use is teaching. Seeing that a capital letter differs from its lowercase form by one bit, or that the digits occupy a contiguous run starting at 48, turns character encoding from an abstraction into something you can check by hand. It also makes the size of text concrete: an eight-bit group per character is why a plain ASCII file is one byte per letter.

Binary also appears in puzzle and capture-the-flag challenges, where a string of ones and zeros is a common first-layer encoding, often combined with base64 or a Caesar shift. Recognising the shape of eight-digit groups separated by spaces is usually enough to identify it instantly.

For real data handling, binary text is the wrong tool. Transporting arbitrary data through a text channel is what base64 and hexadecimal are for, and both are far more compact: base64 expands data by a third, hex doubles it, and binary text expands it eightfold before counting separators.

Frequently asked questions

Why do some characters produce more than eight digits?
Eight digits cover values up to 255. A character with a larger code value needs more digits, so an accented letter, a CJK character or a Cyrillic letter can come out as sixteen. The tool pads to a minimum of eight and never truncates, so the value always round-trips.
Why does one emoji produce two groups?
Characters above U+FFFF are stored as a surrogate pair of two units, and the tool writes one group per unit. Decoding the two groups in order reassembles the original emoji correctly; splitting them apart does not.
Is this the same as UTF-8 bytes?
For plain ASCII text, yes, since each character is one byte with the same value. For anything else, no. UTF-8 encodes a non-ASCII character as two to four bytes with continuation bit patterns, which is a different sequence from the single code unit value shown here.
Do I need to pad every group to eight digits?
Not for decoding. Leading zeros do not change the value, so 1001000 and 01001000 both give H. Padding is a readability convention that makes groups line up and makes the byte boundary obvious.
Why does my binary fail to decode?
Every whitespace-separated group must contain only the characters 0 and 1. Commas, hyphens, the digit 2 or any stray label makes the input invalid, and the tool reports an error rather than decoding part of it. Strip the extra characters and leave spaces or line breaks as separators.
Can I use binary to hide text?
No. Binary is an encoding, not a cipher, and anybody who recognises eight-digit groups can decode it in seconds. It conceals nothing and should never be used to protect information.