Binary ⇄ Text Converter
Convert text to binary and back, byte by byte, showing how characters become numbers and how encoding decides which number stands for which character.
Updated · Recently improved tools
There is no such thing as "the binary" of a character
Converting text to binary requires choosing an encoding first, and the choice changes every byte — including for plain ASCII:
| Character | UTF-8 | UTF-16 | Same? |
|---|---|---|---|
| A | 41 (1) | 00 41 (2) | no |
| é | c3 a9 (2) | 00 e9 (2) | no |
| € | e2 82 ac (3) | 20 ac (2) | no |
| 中 | e4 b8 ad (3) | 4e 2d (2) | no |
| 😀 | f0 9f 98 80 (4) | d8 3d de 00 (4) | no |
Not one of them matches. Even A is one byte in UTF-8 and two in UTF-16. And
neither encoding is smaller in general — UTF-8 is compact for Latin text and costs three bytes
for Chinese where UTF-16 costs two. Which is better depends entirely on what you are writing.
This converter uses UTF-8, which is the right default for anything going near the web. But "the binary of é" is a question with more than one correct answer, and a tool that does not tell you which encoding it used has left something out.
And "how long is this text" has four answers
😀 is a single character and a single code point,
U+1F600. JavaScript stores strings as UTF-16, and anything
above U+FFFF needs two units — a surrogate pair,
U+D83D U+DE00 — so
"😀".length is 2 rather than 1. Slice at one
unit and you get half a surrogate pair, which is why naive truncation produces those little
replacement squares.
A family emoji is worse, because it is several code points joined by invisible zero-width characters:
| Text | UTF-8 bytes | UTF-16 units | Code points | Characters you see |
|---|---|---|---|---|
| 😀 | 4 | 2 | 1 | 1 |
| 👨👩👧 | 18 | 8 | 5 | 1 |
| Hi 😀 | 7 | 5 | 4 | 4 |
So for a string as short as Hi 😀 the question "how long is this" has four
defensible answers: 56 bits in utf-8, 80 bits in utf-16, 5 javascript string length, 4 characters a reader sees. Any
tool reporting a single number is choosing among those silently.
That matters wherever a limit is enforced — a 280-character post, a database column measured in
bytes, an SMS billed per segment. On plain ASCII all the character counts agree, which is
precisely why the distinction goes unnoticed: Hello is 5 units,
5 code points and 5 characters, and only the byte counts
differ. The first emoji is where that quietly stops being true.
How to use
- Type text to see its binary representation.
- Paste binary, space-separated by byte, to decode it.
- Note that the result depends on the character encoding.
- Non-English characters take more than one byte.
Frequently asked questions
How does text become binary?
Each character is assigned a number by a character encoding, and that number is written in base two. In ASCII, capital A is 65, which is 01000001. The binary itself carries no information about which encoding produced it — that has to be known separately.
What is ASCII?
A 1963 encoding assigning numbers 0 to 127 to English letters, digits, punctuation and control codes. Seven bits covers it. Its limitation is obvious: no accents, no non-Latin scripts, no symbols beyond a basic set.
How does Unicode fit in?
Unicode assigns a number to every character in every script, and UTF-8 encodes those numbers as one to four bytes. It was designed so the first 128 values match ASCII exactly, meaning plain English text is byte-identical in both — which is why UTF-8 could be adopted without breaking everything already written.
Why does an accented letter take two bytes?
Because it falls outside the ASCII range. In UTF-8, characters above 127 use multiple bytes, so e-acute takes two, most CJK characters take three, and emoji take four. A string's length in characters and its length in bytes are therefore different numbers, which causes a steady supply of bugs.
What is a null byte?
The value zero, 00000000. In C and languages derived from it, a null byte marks the end of a string, which means text containing one is silently truncated. It is a common source of both bugs and security vulnerabilities.
Is binary text a form of encryption?
No. It is a representation, not a cipher — anyone can convert it back with no key and no effort. Binary, hexadecimal and Base64 all obscure text from casual reading without providing any security whatever.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.