What is ASCII Text to Binary Converter?
This text to binary converter turns English letters, words and sentences into binary code. Every character has a numeric code, and for English letters, digits and punctuation that code fits in one byte: H is 72, which is 01001000, and i is 105, which is 01101001, so "Hi" becomes 01001000 01101001.
Type or paste any text and the binary appears instantly, with each character as an 8-bit group. You can separate the bytes with spaces, commas or new lines, or join them into one continuous string.
How to use ASCII Text to Binary Converter
- Type or paste the text you want to convert.
- Read the binary code, one 8-bit group per character.
- Choose the separator: space, comma, new line or none.
- Copy the binary, or click Swap to convert binary back to text.
Key features
- Converts any text to binary, one byte per character
- 8-bit groups padded with leading zeros
- Separator choice: space, comma, new line or none
- Swap button to decode binary back to text
- Instant conversion as you type
- Runs entirely in your browser
Common use cases
- Teaching how computers store text
- Creating binary messages for puzzles, games and gifts
- Generating test data for binary parsers
- Checking the bit patterns of characters
- Building capture-the-flag challenges
Technical details & standards
Each character is converted to its code and written in binary, padded to 8 bits: A = 65 = 01000001, a = 97 = 01100001, 0 = 48 = 00110000 and a space = 32 = 00100000. Upper and lower case letters differ by one bit (32).
The code used is the character's UTF-16 code unit, which equals its ASCII code for all ASCII characters. Characters outside ASCII get longer codes: é is 233 (11101001) and € is 8364 (10000010101100), which is not the same as their UTF-8 byte sequence, so use ASCII text for portable results.
How to convert letters to binary code by hand
Each character has a number, and each number has an 8-bit binary form. Here is the word "Go":
- Look up each character's code: G is 71 and o is 111.
- Write 71 as a sum of powers of two: 64 + 4 + 2 + 1. Put a 1 in those places of 128, 64, 32, 16, 8, 4, 2, 1, and 0 elsewhere: 01000111.
- Do the same for 111 = 64 + 32 + 8 + 4 + 2 + 1, which gives 01101111.
- Join the bytes with a space so each character stays readable.
Result: "Go" in binary is 01000111 01101111. The table below gives every letter, so for short words you can skip the arithmetic.
Convert words to binary code in Python and JavaScript
Both snippets turn each character into an 8-bit group separated by spaces, like the converter. The second line of each encodes the text as UTF-8 first, which is what you want for accented letters and emoji.
Python
" ".join(format(ord(c), "08b") for c in "Go") # '01000111 01101111'
" ".join(f"{b:08b}" for b in "café".encode("utf-8")) # '01100011 01100001 01100110 11000011 10101001'JavaScript
[..."Go"].map(c => c.charCodeAt(0).toString(2).padStart(8, "0")).join(" ");
// "01000111 01101111"
[...new TextEncoder().encode("café")].map(b => b.toString(2).padStart(8, "0")).join(" ");
// "01100011 01100001 01100110 11000011 10101001"The alphabet in binary: letters A–Z
The 8-bit binary code of every letter, in capitals and lowercase. The two forms differ only in the third bit from the left (worth 32), which is how text to binary converters and old keyboards switch case.
| Letter | Uppercase binary | Lowercase binary | Decimal (upper / lower) |
|---|---|---|---|
| A | 01000001 | 01100001 | 65 / 97 |
| B | 01000010 | 01100010 | 66 / 98 |
| C | 01000011 | 01100011 | 67 / 99 |
| D | 01000100 | 01100100 | 68 / 100 |
| E | 01000101 | 01100101 | 69 / 101 |
| F | 01000110 | 01100110 | 70 / 102 |
| G | 01000111 | 01100111 | 71 / 103 |
| H | 01001000 | 01101000 | 72 / 104 |
| I | 01001001 | 01101001 | 73 / 105 |
| J | 01001010 | 01101010 | 74 / 106 |
| K | 01001011 | 01101011 | 75 / 107 |
| L | 01001100 | 01101100 | 76 / 108 |
| M | 01001101 | 01101101 | 77 / 109 |
| N | 01001110 | 01101110 | 78 / 110 |
| O | 01001111 | 01101111 | 79 / 111 |
| P | 01010000 | 01110000 | 80 / 112 |
| Q | 01010001 | 01110001 | 81 / 113 |
| R | 01010010 | 01110010 | 82 / 114 |
| S | 01010011 | 01110011 | 83 / 115 |
| T | 01010100 | 01110100 | 84 / 116 |
| U | 01010101 | 01110101 | 85 / 117 |
| V | 01010110 | 01110110 | 86 / 118 |
| W | 01010111 | 01110111 | 87 / 119 |
| X | 01011000 | 01111000 | 88 / 120 |
| Y | 01011001 | 01111001 | 89 / 121 |
| Z | 01011010 | 01111010 | 90 / 122 |
Frequently asked questions
How do I convert letters into binary?
Look up each character's ASCII code and write it as an 8-bit binary number. "Hi": H = 72 = 01001000 and i = 105 = 01101001.
What is "hello" in binary?
01101000 01100101 01101100 01101100 01101111, one byte each for h, e, l, l and o.
What is the letter A in binary?
Uppercase A is 01000001 (65) and lowercase a is 01100001 (97). The only difference is the bit worth 32.
Why are there 8 digits per letter?
Text is stored in bytes of 8 bits. ASCII only needs 7, so the first bit of every ASCII character is 0, but writing full bytes keeps the groups aligned.
How are accented letters such as é converted to binary?
This converter writes each character's code, so é (code 233) becomes the single byte 11101001. Files and web pages usually store é in UTF-8 instead, as the two bytes 11000011 10101001, so use the UTF-8 snippet above when you need the bytes as they are saved.