Text to binary converter
Convert text to binary code: every character becomes one or more bytes of 8 bits, written as 0s and 1s. The conversion runs in your browser and nothing is uploaded.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Example
Hello é😀 becomes 01001000 01100101 01101100 01101100 01101111 00100000 11000011 10101001 11110000 10011111 10011000 10000000. The note under the result says that the text is 12 bytes in UTF-8: five letters and a space take one byte each, the accented é two bytes and the emoji four.
How a letter becomes bits
Each character has a number. H is 72, which in binary is 01001000: 64 + 8. Computers store text as these numbers, one byte per ASCII character. For other characters UTF-8 uses two to four bytes.
| Character | Decimal | Binary |
|---|---|---|
| A | 65 | 01000001 |
| a | 97 | 01100001 |
| 0 | 48 | 00110000 |
| space | 32 | 00100000 |
Related conversions
Hexadecimal writes the same bytes in a shorter form: see text to hexadecimal. For the decimal codes use text to ASCII. To convert a number itself between bases, use the number base converter.
Frequently asked questions
Why does é take 16 bits and an emoji 32?
The text is encoded as UTF-8. Letters from A to Z, digits and common punctuation take one byte, accented letters usually two, and emoji four. `é` is `11000011 10101001` and 😀 is `11110000 10011111 10011000 10000000`.
How do I read a byte such as 01001000?
Each bit is worth a power of two, from 128 on the left to 1 on the right. 01001000 is 64 + 8 = 72, which is the code for H.
Can I remove the spaces between the bytes?
Yes, choose *None* as the separator to get one long string, such as `0100100001101001` for `Hi`.
How do I convert the binary back?
Paste it into [binary to text](/en/text/binary-to-text). Groups with or without spaces are both accepted.