Complete character-to-binary mapping for ASCII codes 0-127
I have built and referenced countless ASCII-to-binary tables over the years, and I always come back to the same appreciation: ASCII's design is beautifully systematic. Every uppercase letter differs from its lowercase counterpart by exactly one bit (bit 5). Digits 0 through 9 occupy codes 48-57, meaning you can convert '0' to binary by writing 0110000 plus the digit value. Once you internalize these patterns, manual binary decoding becomes almost as fast as reading plain text.
The first 32 ASCII codes are control characters — they do not print anything but control how data is interpreted. Here is what each one means:
| Dec | Hex | Binary (7-bit) | Binary (8-bit) | Char |
|---|---|---|---|---|
| 0 | 0x00 | 0000000 | 00000000 | NUL |
| 1 | 0x01 | 0000001 | 00000001 | SOH |
| 2 | 0x02 | 0000010 | 00000010 | STX |
| 3 | 0x03 | 0000011 | 00000011 | ETX |
| 4 | 0x04 | 0000100 | 00000100 | EOT |
| 5 | 0x05 | 0000101 | 00000101 | ENQ |
| 6 | 0x06 | 0000110 | 00000110 | ACK |
| 7 | 0x07 | 0000111 | 00000111 | BEL |
| 8 | 0x08 | 0001000 | 00001000 | BS |
| 9 | 0x09 | 0001001 | 00001001 | TAB |
| 10 | 0x0A | 0001010 | 00001010 | LF |
| 11 | 0x0B | 0001011 | 00001011 | VT |
| 12 | 0x0C | 0001100 | 00001100 | FF |
| 13 | 0x0D | 0001101 | 00001101 | CR |
| 14 | 0x0E | 0001110 | 00001110 | SO |
| 15 | 0x0F | 0001111 | 00001111 | SI |
| 16 | 0x10 | 0010000 | 00010000 | DLE |
| 17 | 0x11 | 0010001 | 00010001 | DC1 |
| 18 | 0x12 | 0010010 | 00010010 | DC2 |
| 19 | 0x13 | 0010011 | 00010011 | DC3 |
| 20 | 0x14 | 0010100 | 00010100 | DC4 |
| 21 | 0x15 | 0010101 | 00010101 | NAK |
| 22 | 0x16 | 0010110 | 00010110 | SYN |
| 23 | 0x17 | 0010111 | 00010111 | ETB |
| 24 | 0x18 | 0011000 | 00011000 | CAN |
| 25 | 0x19 | 0011001 | 00011001 | EM |
| 26 | 0x1A | 0011010 | 00011010 | SUB |
| 27 | 0x1B | 0011011 | 00011011 | ESC |
| 28 | 0x1C | 0011100 | 00011100 | FS |
| 29 | 0x1D | 0011101 | 00011101 | GS |
| 30 | 0x1E | 0011110 | 00011110 | RS |
| 31 | 0x1F | 0011111 | 00011111 | US |
Key point: Control characters like LF (10, line feed) and CR (13, carriage return) are critical for understanding text file formats. Windows uses CR+LF (00001101 00001010), while Unix uses just LF (00001010). This difference causes the classic "mixed line endings" problem.
Codes 32-126 are the printable characters. Code 127 is DEL. Here is the full table:
| Dec | Hex | Binary (7-bit) | Binary (8-bit) | Char |
|---|---|---|---|---|
| 32 | 0x20 | 0100000 | 00100000 | [Space] |
| 33 | 0x21 | 0100001 | 00100001 | ! |
| 34 | 0x22 | 0100010 | 00100010 | " |
| 35 | 0x23 | 0100011 | 00100011 | # |
| 36 | 0x24 | 0100100 | 00100100 | $ |
| 37 | 0x25 | 0100101 | 00100101 | % |
| 38 | 0x26 | 0100110 | 00100110 | & |
| 39 | 0x27 | 0100111 | 00100111 | ' |
| 40 | 0x28 | 0101000 | 00101000 | ( |
| 41 | 0x29 | 0101001 | 00101001 | ) |
| 42 | 0x2A | 0101010 | 00101010 | * |
| 43 | 0x2B | 0101011 | 00101011 | + |
| 44 | 0x2C | 0101100 | 00101100 | , |
| 45 | 0x2D | 0101101 | 00101101 | - |
| 46 | 0x2E | 0101110 | 00101110 | . |
| 47 | 0x2F | 0101111 | 00101111 | / |
| 48 | 0x30 | 0110000 | 00110000 | 0 |
| 49 | 0x31 | 0110001 | 00110001 | 1 |
| 50 | 0x32 | 0110010 | 00110010 | 2 |
| 51 | 0x33 | 0110011 | 00110011 | 3 |
| 52 | 0x34 | 0110100 | 00110100 | 4 |
| 53 | 0x35 | 0110101 | 00110101 | 5 |
| 54 | 0x36 | 0110110 | 00110110 | 6 |
| 55 | 0x37 | 0110111 | 00110111 | 7 |
| 56 | 0x38 | 0111000 | 00111000 | 8 |
| 57 | 0x39 | 0111001 | 00111001 | 9 |
| 58 | 0x3A | 0111010 | 00111010 | : |
| 59 | 0x3B | 0111011 | 00111011 | ; |
| 60 | 0x3C | 0111100 | 00111100 | < |
| 61 | 0x3D | 0111101 | 00111101 | = |
| 62 | 0x3E | 0111110 | 00111110 | > |
| 63 | 0x3F | 0111111 | 00111111 | ? |
| 64 | 0x40 | 1000000 | 01000000 | @ |
| 65 | 0x41 | 1000001 | 01000001 | A |
| 66 | 0x42 | 1000010 | 01000010 | B |
| 67 | 0x43 | 1000011 | 01000011 | C |
| 68 | 0x44 | 1000100 | 01000100 | D |
| 69 | 0x45 | 1000101 | 01000101 | E |
| 70 | 0x46 | 1000110 | 01000110 | F |
| 71 | 0x47 | 1000111 | 01000111 | G |
| 72 | 0x48 | 1001000 | 01001000 | H |
| 73 | 0x49 | 1001001 | 01001001 | I |
| 74 | 0x4A | 1001010 | 01001010 | J |
| 75 | 0x4B | 1001011 | 01001011 | K |
| 76 | 0x4C | 1001100 | 01001100 | L |
| 77 | 0x4D | 1001101 | 01001101 | M |
| 78 | 0x4E | 1001110 | 01001110 | N |
| 79 | 0x4F | 1001111 | 01001111 | O |
| 80 | 0x50 | 1010000 | 01010000 | P |
| 81 | 0x51 | 1010001 | 01010001 | Q |
| 82 | 0x52 | 1010010 | 01010010 | R |
| 83 | 0x53 | 1010011 | 01010011 | S |
| 84 | 0x54 | 1010100 | 01010100 | T |
| 85 | 0x55 | 1010101 | 01010101 | U |
| 86 | 0x56 | 1010110 | 01010110 | V |
| 87 | 0x57 | 1010111 | 01010111 | W |
| 88 | 0x58 | 1011000 | 01011000 | X |
| 89 | 0x59 | 1011001 | 01011001 | Y |
| 90 | 0x5A | 1011010 | 01011010 | Z |
| 91 | 0x5B | 1011011 | 01011011 | [ |
| 92 | 0x5C | 1011100 | 01011100 | \ |
| 93 | 0x5D | 1011101 | 01011101 | ] |
| 94 | 0x5E | 1011110 | 01011110 | ^ |
| 95 | 0x5F | 1011111 | 01011111 | _ |
| 96 | 0x60 | 1100000 | 01100000 | ` |
| 97 | 0x61 | 1100001 | 01100001 | a |
| 98 | 0x62 | 1100010 | 01100010 | b |
| 99 | 0x63 | 1100011 | 01100011 | c |
| 100 | 0x64 | 1100100 | 01100100 | d |
| 101 | 0x65 | 1100101 | 01100101 | e |
| 102 | 0x66 | 1100110 | 01100110 | f |
| 103 | 0x67 | 1100111 | 01100111 | g |
| 104 | 0x68 | 1101000 | 01101000 | h |
| 105 | 0x69 | 1101001 | 01101001 | i |
| 106 | 0x6A | 1101010 | 01101010 | j |
| 107 | 0x6B | 1101011 | 01101011 | k |
| 108 | 0x6C | 1101100 | 01101100 | l |
| 109 | 0x6D | 1101101 | 01101101 | m |
| 110 | 0x6E | 1101110 | 01101110 | n |
| 111 | 0x6F | 1101111 | 01101111 | o |
| 112 | 0x70 | 1110000 | 01110000 | p |
| 113 | 0x71 | 1110001 | 01110001 | q |
| 114 | 0x72 | 1110010 | 01110010 | r |
| 115 | 0x73 | 1110011 | 01110011 | s |
| 116 | 0x74 | 1110100 | 01110100 | t |
| 117 | 0x75 | 1110101 | 01110101 | u |
| 118 | 0x76 | 1110110 | 01110110 | v |
| 119 | 0x77 | 1110111 | 01110111 | w |
| 120 | 0x78 | 1111000 | 01111000 | x |
| 121 | 0x79 | 1111001 | 01111001 | y |
| 122 | 0x7A | 1111010 | 01111010 | z |
| 123 | 0x7B | 1111011 | 01111011 | { |
| 124 | 0x7C | 1111100 | 01111100 | | |
| 125 | 0x7D | 1111101 | 01111101 | } |
| 126 | 0x7E | 1111110 | 01111110 | ~ |
| 127 | 0x7F | 1111111 | 01111111 | DEL |
One of my favorite ASCII design details is how uppercase and lowercase letters relate at the binary level:
1000001 (65), a = 1100001 (97)A (65) XOR 32 = a (97)This means you can convert between cases with a single bitwise XOR operation. This is not just a curiosity — old terminal protocols used this property to implement case-insensitive matching without string comparison.
The ASCII table above shows both 7-bit and 8-bit binary representations. Here is why both matter:
When using a binary to text converter, you will most often see 8-bit sequences, since computers work with bytes. But understanding the 7-bit foundation helps you recognize that the leading bit in standard ASCII should always be 0.
This reference table pairs perfectly with our binary translator tools. When you use the binary decoder, you can cross-reference the binary output against this table to verify your results. The pattern I recommend: look at the binary output, identify the first 4 bits (high nibble) and last 4 bits (low nibble), then find the character in the table. With practice, you will start recognizing common characters by their binary patterns alone — 01000001 is always 'A', 01100001 is always 'a'.
Open the Binary Code Decoder in a new tab and enter some binary patterns to see the results instantly. All conversions happen in your browser — no data is sent to any server.