Binary translator
Converts text into binary code and decodes binary back into readable text.
This binary translator converts text to binary code and turns binary back into text. Type a word and press Text → binary to see it as ones and zeros, or paste a string of binary groups and press Binary → text to decode it. Both directions work instantly in the same box.
Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.
How to use it
- Type or paste your text into the box.
- Press Text → binary to encode it, or Binary → text to decode.
- Read the result in the same box.
- Press Copy to take it with you.
What this tool does
Encoding happens in three steps. Each character is looked up to get its numeric code point — A is 65, a is 97, a space is 32. That number is written in base 2, using only the digits 0 and 1. The result is padded with leading zeros to at least eight digits, because eight bits make one byte, and groups are separated by a single space so the output stays readable.
Decoding reverses it: the input is split on whitespace, each group is read as a base-2 number, and that number is turned back into a character. If the input contains anything other than 0, 1 and spaces, it is left untouched rather than producing garbage — so pressing the decode button on ordinary text does no harm.
Line breaks in your text become their own code (10), so multi-line input round-trips correctly. There is no length limit worth worrying about; a page of text produces a long but perfectly valid string.
Examples
| Text | Binary |
|---|---|
| A | 01000001 |
| Hi | 01001000 01101001 |
| (space) | 00100000 |
| 0 | 00110000 |
Walking through the letter H: its code point is 72. In base 2, 72 is 1001000 — seven digits. Pad to eight and you get 01001000. Every ASCII character behaves the same way, which is why English text always comes out as neat eight-digit groups.
Beyond ASCII. Only the first 128 characters fit in eight bits. A Cyrillic letter such as Д has code point 1044, and 1044 in binary is 10000010100 — eleven digits, so the group is longer than eight. Emoji are further out still: 🙂 is code point 128578, which is 11111011010000010. In a real file those characters are stored as two, three or four bytes using UTF-8. Here each character is shown as one group of however many bits it needs, which keeps the mapping between character and group obvious.
When you need it
- Homework and coursework. Number systems, character encoding and ASCII tables are standard first-year computing topics, and checking your answer against a converter is faster than counting bits by hand.
- Teaching. Showing a class that a letter really is just a number, and a number really is just a pattern of switches.
- Puzzles and games. Escape rooms, ARGs and geocaching clues use binary constantly.
- Novelty. Binary in a bio, on a t-shirt, or as a hidden message in a message thread.
- Debugging. Seeing exactly which code point an odd-looking character has, when something in a file is not what it appears to be.
Doing it without this tool
Excel: =DEC2BIN(CODE(A1),8) converts one character. CODE gives the code point, DEC2BIN converts it, and the 8 pads it. Note that DEC2BIN only handles values up to 511, so anything outside basic Latin fails.
Python: " ".join(format(ord(c),"08b") for c in "Hi") encodes; "".join(chr(int(b,2)) for b in s.split()) decodes.
Command line: echo -n "Hi" | xxd -b shows the bits of every byte. To go back, echo "01001000 01101001" | perl -lape "$_=pack(qq(B*),join q(),split)".
JavaScript console: "Hi".split("").map(c=>c.charCodeAt(0).toString(2).padStart(8,"0")).join(" ").
By hand: look the character up in an ASCII table, then repeatedly divide the number by two and read the remainders bottom to top. Slow, but it is the exercise the homework is usually asking for.
Bits, bytes and why eight
A bit is a single binary digit: 0 or 1, off or on. One bit gives two possibilities, two bits give four, three bits give eight, and each extra bit doubles the range. Eight bits give 256 combinations, from 00000000 to 11111111.
Eight bits together are called a byte, and that grouping is not an accident. The original ASCII standard defined 128 characters — the English alphabet in both cases, the digits, punctuation and a set of control codes — which needs seven bits. Hardware settled on eight, one spare bit that was later used for a second block of 128 accented and box-drawing characters. Once memory was addressed in bytes, the byte became the unit everything else is measured in.
| Bits | Values | Covers |
|---|---|---|
| 7 | 128 | Original ASCII |
| 8 | 256 | One byte, extended Latin |
| 16 | 65,536 | Most living scripts |
| 21 | 1,114,112 | All of Unicode, emoji included |
Unicode assigns a number to every character in every script, well past what eight bits can hold. UTF-8 solves that by using one byte for the old ASCII range and two, three or four bytes for everything else — which is why a Cyrillic letter takes twice the storage of a Latin one, and an emoji takes four times.
Privacy: your text never leaves your browser
The conversion is arithmetic performed by JavaScript in your tab. Nothing is sent anywhere, nothing is stored, and the page needs no network access after it loads.
That is worth knowing if you are decoding something you received and do not yet trust, or encoding a message you would rather not have sitting in someone else’s server log.
Related tools
Frequently asked questions
Paste the text and press Text → binary. Each character becomes its code point written in base 2, padded to eight bits.
Groups of 0s and 1s separated by spaces, for example 01001000 01101001. Anything containing other characters is left unchanged.
Eight bits make one byte, and the original ASCII set fits inside eight bits, so it became the standard grouping.
Their code points are larger than 255, so they need more than eight bits. In files they are stored as two to four bytes using UTF-8.
Yes. Paste the binary groups and press Binary → text; each group is read as a base-2 number and turned back into a character.
Yes. A line break is character code 10, so it converts and converts back like any other character.
No. The conversion runs entirely in your browser and nothing is transmitted or saved.