How does text become binary?
A computer stores everything as bits, 0s and 1s. Every character has a number, written over one or more groups of eight bits called bytes. The letter A is number 65, which is 01000001.
In UTF-8, the most widespread character set, unaccented Latin letters fit in one byte. An accented letter takes two, a Chinese character three, and an emoji usually four.
Encoding and decoding
The “Text” box produces binary as you type. The second box does the opposite. Spaces, commas, line breaks and the 0b prefix are tolerated. Any sign other than 0 or 1 is reported with its position.
Groups of fewer than eight digits, common with seven-bit ASCII, are padded with zeros, and the tool tells you. Files up to 5 MB can be converted too.
A game, not a secret
A message in binary is fun and puzzling, but it protects nothing: anyone can translate it back in seconds. To keep information secret, you have to encrypt it.
Frequently asked questions
How do I write “Hello” in binary?
Type the word in the “Text” box: you get five bytes, one per letter, starting with 01001000 for the H.
Why eight digits per letter?
A byte holds eight bits, which allows 256 values. The leading zeros keep every byte the same length.
Does this tool convert numbers to base 2?
It converts text and bytes. The text “5” gives the code of the character 5, not the number five in base 2.
Why does decoding show bytes instead of text?
The bytes obtained are not valid text in the chosen character set. Check your input or change the “Text encoding” setting.
Is my message sent anywhere?
No. Everything is computed in your browser. Only your settings are kept on your device.