What does a text to binary converter do?
A text to binary converter turns each character of your text into the sequence of bits a computer stores for it. Under the hood it is two steps: the text is encoded as bytes using UTF-8, and each byte — eight bits — is written out as a run of ones and zeros. The conversion is lossless in both directions, so the output can be pasted back in and read as the original text.
The encoding step is where the detail lives. UTF-8 gives the letters, digits and punctuation of English one byte each, so an 8-bit group maps to exactly one character there. Anything outside that set — accented letters, Greek, Cyrillic, Arabic, Chinese, Japanese, emoji — needs two, three or four bytes, and the bit groups are longer as a result. That is why the character count and the byte count agree for plain English and diverge for almost everything else.
Decoding works the other way, with one added risk. Not every sequence of bytes is valid UTF-8, so a stream of bits can decode to text, to a hard error, or to a string of replacement characters depending on how forgiving the decoder is. This tool uses the strict mode: it reports that the bytes are not valid text rather than quietly substituting symbols, which is the useful behaviour when a single bit was lost in copying.
How to convert text to binary and back
- Choose the direction: text to binary, or binary to text. Both work from the same box.
- Type or paste the text, or paste a block of ones and zeros. The result appears as you go.
- Leave byte grouping on if you want to see where one character ends and the next begins — eight bits per group.
- Turn on the 0b prefix if the output is going into a programming context where binary literals are written that way.
- Read the count underneath, which reports characters against bytes and shows the difference for anything beyond plain English.
- Copy the result, or press Use this as the input to send it straight back through the other direction and check it round-trips.
Text to Binary Converter limits and rules
| Item | Limit |
|---|---|
| Encoding | UTF-8, which is what the web uses |
| Bits per byte | Eight, always, so a group of eight is one byte |
| Plain English | One byte, and therefore one 8-bit group, per character |
| Beyond ASCII | Two to four bytes per character — accented letters, scripts and emoji |
| Decoding | Strict UTF-8, so invalid byte sequences are reported rather than guessed |
| Grouping | Optional spaces between bytes and an optional 0b prefix, both ignored on the way back |
| Not handled | UTF-16, UTF-32, base64, hexadecimal output and binary numbers as arithmetic |
When to use it
- Showing what a string actually looks like at the byte level when a length limit or a truncation bug is involved.
- Decoding a run of ones and zeros from a puzzle, a comment in a codebase or a teaching exercise.
- Checking how many bytes a piece of text occupies before it hits a storage or message limit.
- Producing a binary representation of a phrase for a sign, a T-shirt, or a message meant to be looked up rather than read.
- Confirming that a string round-trips through UTF-8 — a useful check when text has arrived from an old system.
Is it private?
The conversion happens entirely in this page. The text is encoded with the browser's own TextEncoder and the bits stay in your tab — nothing is uploaded, stored or logged, which matters for text that should not leave your machine.
Frequently asked questions
Because of how UTF-8 allocates space. The characters that existed in ASCII — the English alphabet, digits and common punctuation — get one byte each, because one byte is all they need. Everything added since, including accented letters, non-Latin scripts and emoji, is encoded in two, three or four bytes using a scheme where the leading bits announce how long the sequence is. So an e is eight bits and a single emoji is thirty-two, and both are correct representations of one character.
It is the notation for a binary literal in many programming languages, borrowed from early assemblers. Writing 0b01001000 tells a compiler that the digits are base two rather than base ten, which otherwise looks the same. It is not part of the value and has no effect on the bits, which is why the decoder strips it: pasting output with prefixes back into the tool works without any cleanup.
Three causes, in order of likelihood. A bit was lost while copying, so a group of eight is really seven or nine and the byte boundaries have all shifted. The bytes were never text to begin with — a compressed file, an encrypted blob or a binary file format is also a sequence of bits, but it is not valid UTF-8 and has no characters to recover. Or the original encoding was not UTF-8: Windows-1252, Latin-1 and Shift-JIS all produce bytes that are valid in their own scheme and invalid here.
Yes, and a byte is eight of them. Eight became the standard width because early machines settled on powers of two for addressing and eight was wide enough to hold the printable ASCII range with room for a parity check. The word came from bite, as in a mouthful of bits, respelled to avoid being mistaken for the existing word. That is why the counts here are in bytes: the bits are the raw form, but bytes are the unit everything else is measured in.
This page works on text you paste, which is the right scope for the problem it solves — showing what a string looks like at the byte level. For a binary file, the useful question is usually different: what are the bytes in hexadecimal, and which ones are not printable? A command like a hex dump answers that and is the better tool. Note also that converting binary to text file by file would produce a very large document, since every byte becomes at least eight characters.
Yes. A line break is a real character with a real byte value, and it appears in the output like any other. Specifically, the textarea supplies a line feed, which is byte 10, or 00001010 in binary. A carriage return, byte 13, appears only if the text carried one in — which happens with text copied from Windows software. Tabs are byte 9. All three convert and decode without special handling, because the conversion never treats them as anything but characters.
Related tools
Written and maintained by Md. Nur Hossain Repon.