Security & devFree

Text to Binary Converter

Free text to binary converter. Encode text to 8-bit binary or decode binary back to text in your browser.

Last updated 14 October 2026

One character is not one byte, so one character is often not eight bits

Text becomes bits here by way of UTF-8, which uses one byte for the ASCII range and two, three or four for everything else. So the number of bits you get out depends on which characters went in, not on how many. Measured:

The status line always tells you the byte count, which is the honest unit, and the output is grouped in eights so you can count the bytes yourself. If you were expecting one group per character, that expectation only holds for plain unaccented English.

You can see the structure of UTF-8 in those bits. A one-byte character starts with a 0. The first byte of a two-byte character starts 110, a three-byte one starts 1110, a four-byte one starts 11110, and every continuation byte starts 10. That is why é is 11000011 10101001: a two-byte lead followed by one continuation. It is also what makes the encoding self-synchronising, so a decoder can find the start of the next character after a corrupt byte.

Decoding refuses bits that are not valid text, rather than showing you question marks

Most converters decode bytes to text with a non-strict decoder, which silently replaces anything invalid with the replacement character �. You then cannot tell a genuine � in the original from a decoding failure. This tool uses a strict decoder and changes what it shows you instead. Measured:

So if you get hex back, the bits are real and the text is not: either they are not UTF-8, or they are a fragment cut mid-character, or they are not text at all. A single byte with the high bit set is the commonest case, and it usually means the data was in a single-byte encoding such as Latin-1 rather than UTF-8.

Bytes holding a carriage return are shown as hex, and that is not a limitation of this tool

Measured: the bytes 61 0D 62, which are a, a carriage return, b, come back as hex with the note “holds a carriage return, which a text box cannot show”.

That is a genuine constraint of the web platform rather than a shortcut here. The HTML standard says a textarea’s API value is “the element’s raw value, with newlines normalized”, and that it is “normalized so that line breaks use U+000A LINE FEED (LF) characters”. So if the decoded text were put in a box, the carriage return would be converted to a line feed on its way in, and you would be shown something that was not what you decoded. Hex is the only honest answer.

The same constraint is why the encode direction has a line-ending choice at all. You cannot type a carriage return into the box, so it has to be asked for. Measured, on two lines of text:

Pick CRLF when the bytes are destined for something that expects Windows line endings, such as an HTTP header block, an email or a file read by an old Windows tool.

The hex input accepts almost any formatting and says precisely what is wrong

Switching the input to hex lets you go from bytes to bits without retyping them. Separators are stripped, so spaces, commas, colons, semicolons, underscores, hyphens and 0x prefixes are all accepted. Measured: 0x48 65:6C-6C_6F is read as five bytes and gives the bits for Hello.

The two ways it can fail both name the problem rather than just refusing:

Decoding has one rule of the same kind: the bits must be a whole number of bytes. Measured, seven bits gives “Bit length must be a multiple of 8, and this is 7.” Anything that is not a 0 or a 1 is discarded first, so you can paste bits with spaces, newlines or commas in them and only the digits are counted.

What this tool deliberately does not do

Nothing is uploaded. The encoding and decoding use built-in browser functions running on your device, and the text never leaves it.

Sources

Every behaviour, byte count and bit string on this page was measured against this tool as it is published, in a browser, on 14 October 2026. Where the page says what the tool does not do, that is a statement about this tool, not about binary conversion in general.

Frequently asked questions

Why did one character produce more than eight bits?

Because UTF-8 uses more than one byte for anything outside the ASCII range. Measured: é is two bytes and sixteen bits, and 🎉 is four bytes and thirty-two bits. The status line gives you the byte count, and the output is grouped in eights so you can count them.

Why did my bits come back as hex instead of text?

Because the bytes are not valid UTF-8 text, so showing them as text would mean inventing characters. Measured: 11111111 on its own returns FF with a note saying so. The usual causes are data in a single-byte encoding such as Latin-1, or a fragment cut in the middle of a multi-byte character.

Why does it say a text box cannot show a carriage return?

Because the HTML standard requires a text box to normalise line breaks to LF in the value a script can read, so a carriage return would be silently converted and you would be shown something other than what you decoded. The tool shows hex instead rather than lie to you. It is the same rule that makes the line-ending option on the encode side necessary.

When should I choose CRLF?

When the bytes are going somewhere that expects Windows line endings: an HTTP header block, an email message, or a file read by an older Windows tool. Measured on two lines of text, LF gives 3 bytes and CRLF gives 4, with 00001101 added before each 00001010.

Can I paste hex with spaces or 0x in it?

Yes. Spaces, commas, colons, semicolons, underscores, hyphens and 0x prefixes are all stripped before parsing. Measured: 0x48 65:6C-6C_6F is read as the five bytes of Hello. An odd number of hex digits or a character outside 0-9 and A-F is refused with a message saying which of the two went wrong.

Why must the bit count be a multiple of eight?

Because the bits are decoded as bytes, and a partial byte has no meaning. Measured: seven bits gives “Bit length must be a multiple of 8, and this is 7.” Anything that is not a 0 or a 1 is discarded before counting, so spaces and newlines in your bits are fine.

Can it do Latin-1, UTF-16 or base64?

No. It encodes and decodes UTF-8 only, and shows binary, with hex as a fallback for bytes that are not text. That is also the likeliest reason a byte sequence out of an old system will not decode here.

Is my text uploaded?

No. Both directions use built-in browser functions running on your device, nothing leaves the page, and nothing is saved, so refreshing loses it.

Related tools