ASCII to Binary: Complete Character Encoding Table
Every time you save a text file, every character becomes a number, and that number becomes binary. The mapping is called ASCII, and it has been the foundation of text encoding since 1963. Here is the full reference, with patterns explained so you do not just memorize — you understand.
If you just need to convert something quickly, skip to the binary translator. If you want the full map, keep reading.
The ASCII Table: Printable Characters (32-126)
These are the characters you actually type. The first 32 characters (0-31) are control codes — newline, tab, backspace — that tell terminals what to do rather than displaying something.
| Dec | Char | Binary | Dec | Char | Binary | Dec | Char | Binary |
|---|---|---|---|---|---|---|---|---|
| 32 | [space] | 00100000 | 64 | @ | 01000000 | 96 | ` | 01100000 |
| 33 | ! | 00100001 | 65 | A | 01000001 | 97 | a | 01100001 |
| 34 | " | 00100010 | 66 | B | 01000010 | 98 | b | 01100010 |
| 35 | # | 00100011 | 67 | C | 01000011 | 99 | c | 01100011 |
| 36 | $ | 00100100 | 68 | D | 01000100 | 100 | d | 01100100 |
| 37 | % | 00100101 | 69 | E | 01000101 | 101 | e | 01100101 |
| 38 | & | 00100110 | 70 | F | 01000110 | 102 | f | 01100110 |
| 39 | ' | 00100111 | 71 | G | 01000111 | 103 | g | 01100111 |
| 48 | 0 | 00110000 | 72 | H | 01001000 | 104 | h | 01101000 |
| 49 | 1 | 00110001 | 73 | I | 01001001 | 105 | i | 01101001 |
| 50 | 2 | 00110010 | 74 | J | 01001010 | 106 | j | 01101010 |
That covers the highlights. The full printable ASCII range continues from decimal 32 to 126.
The Hidden Patterns in ASCII
Uppercase vs Lowercase: The 32-Bit Trick
A = 01000001 (65) a = 01100001 (97) Difference: bit 5 (value 32) is OFF for uppercase, ON for lowercase
This is why (char | 32) in C converts uppercase to lowercase, and (char & ~32) converts lowercase to uppercase. Hardware-level ASCII design, still useful 60 years later.
Digits 0-9: Subtract 48
'0' = 00110000 (48) '1' = 00110001 (49) '9' = 00111001 (57) Last 4 bits = the digit itself: '7' = 0011 0111, low nibble = 0111 = 7
To convert a digit character to its numeric value: subtract 48. Or in binary terms, clear the upper 4 bits. This is why (c - '0') works in every language.
Control Characters (0-31): The Invisible Table
| Dec | Name | Binary | What It Does |
|---|---|---|---|
| 0 | NUL | 00000000 | Null — string terminator in C |
| 9 | TAB | 00001001 | Horizontal tab |
| 10 | LF | 00001010 | Line feed (Unix newline) |
| 13 | CR | 00001101 | Carriage return (Mac/Windows newline) |
| 27 | ESC | 00011011 | Escape — starts terminal control sequences |
CR+LF (00001101 00001010) is why Windows text files have two invisible characters at the end of every line. Unix uses just LF (00001010). This mismatch has broken more scripts than anyone can count.
Using This Table for Binary Translation
When you paste 01001000 01101001 into BinTranslate, the tool splits it into 8-bit groups, converts each to decimal (72 and 105), and looks up the ASCII table (H and i). You get "Hi" as output.
You can do this by hand with the table above, but for strings longer than "Hi," let the tool handle it. The point of learning the table is understanding the patterns — the bit-twiddling tricks, the case toggle, the digit/number distinction. Those patterns make you a sharper programmer even when you never manually convert a single byte.
Extended ASCII and Beyond
The standard ASCII table covers 128 characters (7 bits). Extended ASCII uses the 8th bit to add another 128, covering accented letters, line-drawing characters, and currency symbols — but which characters depend on the code page. Windows-1252 adds different characters than ISO-8859-1, which differs from IBM code page 437.
This mess is exactly why UTF-8 took over. For any text that might travel beyond your machine, use UTF-8. For quick binary-to-text conversions of English content, ASCII with a good binary translator is all you need.