Text to Binary Converter

CharacterDecimalBinary byte
H7201001000
i10501101001
!3300100001
space3200100000
z12201111010
The mechanism is one method with a radix argument, per the MDN Number.prototype.toString reference: 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).
Every letter is one byte: the "Hi" in the placeholder is exactly 01001000 01101001. Uppercase and lowercase differ by a single bit (72 vs 104 for H and h), which is why binary text is case-sensitive in a way speech never is. The full character ladder: the ASCII table. Packed bytes instead of raw ones: Base64 encode-decode. More text toys: text to Morse.

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

  1. Type text in the first box — the binary (UTF-8) appears instantly, one group of 8 bits per character.
  2. Paste binary code into the second box to decode it back into readable text.
  3. 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.

Related tools