Text to Binary Translator
Text ↔ binary, ASCII codes, hex and octal — both directions, live.
Translated in your browser — nothing you type is sentTranslate text to binary and binary back to text — with ASCII, hex and octal
Character by character
| Char | Decimal | Hex | Binary |
|---|
How text becomes binary
Quick answer: every character is stored as a number, and binary is just that number in base 2. In ASCII, H is 72, which is 01001000 in binary; e is 101 (01100101). Type text above and you get each character’s code in binary, decimal, hex and octal at once — or switch the direction, paste 0s and 1s, and read the text back. Letters, digits and punctuation take one byte (8 bits) each; accented letters like é and ñ take two bytes in UTF-8.
The character-by-character table under the results shows the whole mapping, which is the part most translators hide: one row per character with its bytes in every base. That makes it useful for checking homework, decoding a binary message someone sent you, or seeing why “café” is 4 characters but 5 bytes in UTF-8. The encoding menu switches to extended ASCII (Windows-1252), where every character is exactly one byte — é is 233 and ñ is 241, the numbers in the extended ASCII table — which is what older systems and many textbooks use.
Pasted codes work with or without spaces: 0100100001101001 is split into bytes automatically, and 0x / 0b prefixes, commas and line breaks are ignored. Auto-detect picks binary, decimal or hex from what you paste and says which it chose; if your numbers are ambiguous (48 65 could be decimal or hex), set the input format yourself. Everything runs in your browser — nothing you type is uploaded.
Text to binary step by step
- Find each character’s code in the ASCII table: H = 72, i = 105, ! = 33.
- Write each code as a sum of powers of two — 128, 64, 32, 16, 8, 4, 2, 1. 72 = 64 + 8.
- Put a 1 under every power you used and a 0 under the rest, always 8 digits: 72 → 01001000.
- Separate the bytes with spaces so they can be read back: “Hi!” → 01001000 01101001 00100001.
| Char | ASCII (decimal) | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Binary | Hex |
|---|---|---|---|---|---|---|---|---|---|---|---|
| H | 72 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 01001000 | 48 |
| i | 105 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 01101001 | 69 |
| ! | 33 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 00100001 | 21 |
Text to binary (and back) in Excel and Google Sheets
One character in A1 → 8-bit binary:
=DEC2BIN(CODE(A1),8) → 01001000 for "H"
One byte back to a character:
=CHAR(BIN2DEC("01001000")) → H
A whole word in A1 (Excel 365):
=TEXTJOIN(" ",TRUE,DEC2BIN(CODE(MID(A1,SEQUENCE(LEN(A1)),1)),8))
Space-separated binary in A1 back to text (Excel 365):
=CONCAT(CHAR(BIN2DEC(TEXTSPLIT(A1," "))))
Google Sheets — same idea, wrapped in ARRAYFORMULA:
=ARRAYFORMULA(TEXTJOIN(" ",TRUE,DEC2BIN(CODE(MID(A1,SEQUENCE(LEN(A1)),1)),8)))
=JOIN("",ARRAYFORMULA(CHAR(BIN2DEC(SPLIT(A1," ")))))Common mistakes when translating binary
| Mistake | What goes wrong | Fix |
|---|---|---|
| Dropping the leading zeros | 72 is 1001000 in plain binary — only 7 digits. Without the leading 0 the bytes run together and the text decodes wrong. | Always pad each character to 8 bits: 01001000. |
| Reading unspaced binary as one number | 0100100001101001 is two bytes (H and i), not the number 18,537. | Split into groups of 8 from the left; the tool does it automatically. |
| Confusing the digit 1 with the number 1 | The character “1” is ASCII 49 (00110001), not 00000001. Digits in text are characters too: 0–9 are codes 48–57. | Use the translator for text and the number base converter for numbers. |
| Mixing encodings | Binary made in UTF-8 and read as extended ASCII turns é into é; the reverse turns it into �. | Decode with the same encoding that encoded. If you see à or �, switch the encoding menu. |
Reference tables
FAQ
How do I convert text to binary by hand?
Look up each character’s code in an ASCII table, then write that number in base 2 using 8 digits. H is 72: 72 = 64 + 8, so the bits for 64 and 8 are on — 01001000. Repeat for every character and separate the bytes with spaces. The ASCII table reference on this site lists all 128 codes in binary already.
How do I translate binary back to text?
Split the binary into groups of 8 bits, convert each group to a number, and look the number up in an ASCII table: 01001000 01101001 → 72 105 → “Hi”. Or paste it into the tool with the direction set to “Binary / ASCII → text” — it splits unspaced binary into bytes for you.
Why does é (or ñ) turn into two bytes?
Because UTF-8 — the encoding of the web — stores every character outside basic ASCII in two to four bytes. é is C3 A9 in hex (11000011 10101001). In the older extended-ASCII code page Windows-1252 it is one byte, 233 (11101001). Both are “correct”; they are different encodings, and the menu lets you pick either.
What is the binary code for the letter A?
Uppercase A is 65, which is 01000001 in binary; lowercase a is 97, 01100001. Uppercase and lowercase differ by exactly one bit (the 32s bit), which is why switching case in binary is a single bit flip.