Text to Binary Converter
| Character | Decimal | Binary byte |
|---|---|---|
| H | 72 | 01001000 |
| i | 105 | 01101001 |
| ! | 33 | 00100001 |
| space | 32 | 00100000 |
| z | 122 | 01111010 |
n.toString(2) renders any integer in binary, parseInt(s, 2) reads it back, and the same call handles hex (16) and every base from 2 to 36. The honest limits: the operator converts through a 64-bit float, so bitwise-exact work beyond 2²53 needs BigInt (whose own toString(2) has no ceiling).Bottom line: 'Hi' is 01001000 01101001 - H is byte 72, i is byte 105, and each 8-bit block is exactly one character, which is why a 1,000-word essay lands near 5.5 KB of pure text: about 5,500 characters, one byte each. Emoji break the one-byte rule on purpose - more below.
Type any text and see exactly how a computer stores it: every character becomes a byte of 8 binary digits (UTF-8 encoding), with spaces between bytes so you can read the pattern. Paste binary code — space-separated bytes — and it decodes back into text in the other direction.
This is the classic computer-science exercise: seeing that 'Hi' is 01001000 01101001 makes abstract bits concrete. It works for emoji too (they take more than one byte, which is the lesson hiding in plain sight).
How to use
- Type text in the first box — the binary (UTF-8) appears instantly, one group of 8 bits per character.
- Paste binary code into the second box to decode it back into readable text.
- Note how many bytes emoji take compared to plain letters — that is UTF-8 in action.
Frequently asked questions
How does text become binary?
Each character is mapped to a number by the UTF-8 standard, and that number is written in base 2 (binary). The letter H is number 72, which is 01001000 in binary — one byte per character for plain English text.
Why do emoji take more bits than letters?
Emoji are characters outside the basic ASCII range, so UTF-8 encodes them as multiple bytes — often 4, or 32 binary digits. The converter shows this live: type one letter, then one emoji, and compare.
Can I decode binary I found online?
Yes, if it is standard space-separated 8-bit UTF-8 bytes like 01001000 01101001. The decoder is strict about grouping so partial bytes fail loudly instead of decoding to nonsense.
Is this the same as encryption?
No — binary is an encoding, not a cipher. Anyone can decode it. Encryption transforms data with a secret key; this simply shows the same text in a different notation.
Why does an emoji become more than one byte?
UTF-8 is variable-width by design: plain ASCII letters cost one byte, accented letters like e-acute cost two, rarer scripts cost three, and emoji - which live above the basic plane - cost four bytes each (the thumbs-up is four bytes: F0 9F 91 8D in hex). The first bits of every byte announce how many bytes the character spans, so decoders never confuse a continuation with a new character. Paste an emoji in and watch the byte count jump: that is Unicode paying for universal coverage in storage.