ascii tableascii codescharacter encodingbinarydeveloper reference

ASCII Table Reference: Every Character Explained

The ASCII table maps numbers 0 to 127 to characters. Learn what ASCII is, why it still matters in modern computing, and how to use the table for encoding and programming.

6 min read

Related Tool

ASCII Table

Open tool

ASCII stands for American Standard Code for Information Interchange. Defined in 1963 and finalized in 1968, it is one of the oldest and most fundamental character encoding standards in computing. Despite its age, ASCII remains foundational in modern programming, networking, and data exchange. Understanding the ASCII table is a basic literacy skill for any developer.

What ASCII Does

ASCII assigns a number from 0 to 127 to each of 128 characters. These include lowercase and uppercase Latin letters, digits 0 through 9, punctuation marks, and a set of control characters. The numbers fit in 7 bits, which is why ASCII uses code points 0 to 127.

Every ASCII-compatible encoding (including UTF-8, the dominant encoding today) preserves ASCII's character assignments for those first 128 code points. ASCII text is valid UTF-8 text, which is a key reason for ASCII's lasting importance.

The Three Sections of the ASCII Table

Control Characters (0 to 31 and 127)

The first 32 code points and code point 127 are control characters, originally designed to control devices like printers and teletypes. Many are obsolete as device control codes but some remain relevant:

0 (NUL): null character, used as a string terminator in C.

9 (HT): horizontal tab.

10 (LF): line feed, the newline character in Unix and modern systems.

13 (CR): carriage return, paired with LF in Windows line endings.

27 (ESC): escape, used in terminal escape sequences for cursor control and color.

127 (DEL): delete.

Printable Characters (32 to 126)

Code points 32 through 126 are printable characters.

32: space.

33 to 47: punctuation and special characters (!, ", #, $, %, &, ', (, ), *, +, comma, -, ., /).

48 to 57: digit characters 0 through 9.

58 to 64: more punctuation (:, ;, <, =, >, ?, @).

65 to 90: uppercase A through Z.

91 to 96: more symbols ([, backslash, ], ^, _, backtick).

97 to 122: lowercase a through z.

123 to 126: final symbols ({, |, }, ~).

The Structure Is Not Accidental

The layout was designed with purpose. Uppercase A is 65 (binary 01000001). Lowercase a is 97 (binary 01100001). The difference is exactly 32, which means you can toggle case by flipping a single bit. The digit characters 0 through 9 start at 48, so the numeric value of a digit character equals the character's code point minus 48.

Why ASCII Still Matters

String comparison: sorting and comparison algorithms for English text work directly on ASCII values. Letters sort in their natural alphabetical order because their code points are in alphabetical order.

Network protocols: HTTP, SMTP, FTP, and many other protocols are defined in terms of ASCII. Header fields, status codes, and commands are ASCII text.

File formats: many file formats use ASCII delimiters, control characters, or magic bytes that you identify by their code point values.

Programming: C-style strings are null-terminated sequences of bytes, where the null character (ASCII 0) marks the end. Character arithmetic (subtracting '0' from a digit character to get its numeric value) uses ASCII code point values directly.

Debugging: when reading raw bytes in a debugger or hex editor, knowing ASCII code points lets you quickly recognize printable characters.

Extended Character Sets

ASCII covers only 128 characters and is limited to English. Extended ASCII standards (like ISO-8859-1 and various Windows code pages) used the values 128 to 255 for additional characters. Unicode (with UTF-8 encoding) superseded these, encoding all of the world's scripts in a single system while remaining ASCII-compatible in the first 128 positions.

Using the DevHexLab ASCII Table

Open the tool at /tools/reference/ascii-table. Browse the full table with decimal, hexadecimal, binary, and character columns. Search by code point or character. Use it as a quick reference whenever you need to look up a code point value.