ASCII table
A complete, searchable ASCII table: all 128 codes with their
decimal, hexadecimal, octal, and 8-bit
binary values, the character, its name, and a description. Type a
character, a number, a 0x hex code, or a control-code name like
LF to jump straight to it. For example,
A is 65 (0x41,
0100 0001).
How ASCII works
ASCII (the American Standard Code for Information Interchange) assigns every letter, digit,
punctuation mark, and control action a number from 0 to
127, which fits in 7 bits. Text is then just a
sequence of these codes: the word "Hi" is 72 105, or
01001000 01101001 in binary. Each code is normally stored in one
8-bit byte with the top bit set to 0. See it happen
in the text to binary tool, or read the
ASCII lesson.
Handy patterns
The layout is deliberate. Digits 0 to 9
are codes 48 to 57, so subtracting
48 (0x30) turns a digit character into its
numeric value. Uppercase A to Z is
65 to 90, and lowercase
a to z is 97 to
122, so a letter's case differs by exactly
32, a single bit (0x20). Flipping that one
bit with the bitwise tools switches case.
Control characters
Codes 0 to 31 and
127 are control characters: they print no glyph
but signal actions. The important ones today are 9 (tab),
10 (line feed, the Unix newline), 13
(carriage return, which pairs with line feed on Windows), and 27
(escape, which starts terminal control sequences). Most of the rest are relics of
teletype and early transmission protocols.
Frequently asked
What is the ASCII code for A?
Uppercase A is 65 (0x41, 0100 0001 in binary). Lowercase a is 97 (0x61). Letters run in order, and lowercase is always 32 more than the matching uppercase letter.
How many characters are in ASCII?
128 codes, numbered 0 to 127, which fit in 7 bits. Codes 0 to 31 and 127 are control characters; 32 to 126 are printable.
What is the difference between a control character and a printable character?
Printable characters (32 to 126) are visible symbols. Control characters (0 to 31 and 127) print no glyph and instead signal actions like line feed (10), carriage return (13), tab (9), and escape (27).
Is ASCII the same as a byte?
An ASCII code needs only 7 bits, but it is almost always stored in one 8-bit byte with the top bit 0. That spare eighth bit is what extended encodings and UTF-8 later used for characters beyond ASCII.
ASCII is how text becomes bits. See a message encode live in the text to binary tool, read the ASCII lesson, or open the lab and build the logic that stores and moves these bytes.
Related tools: text to binary, binary converter, and base converter.
Open the lab →