ASCII Table: Reference for All 128 Character Codes
The American Standard Code for Information Interchange (ASCII) assigns every English letter, digit, punctuation mark and control signal a number from 0 to 127. Our ASCII table lets you search, filter, and instantly convert any text into its underlying character codes — all in decimal, hexadecimal, octal, and binary.
Example: 'A' -> 65 (decimal) -> 0x41 (hex) -> 101 (octal) -> 01000001 (binary).
Printable vs. Control Characters
Codes 32-126 are printable characters you can see (letters, digits, punctuation). Codes 0-31 and 127 are control characters like NUL, TAB, LF, and DEL — they were originally designed to control teleprinters and terminals rather than display a glyph.
Why Letter Case Differs by Exactly 32
Uppercase A-Z occupy 65-90 and lowercase a-z occupy 97-122. The gap between them is always 32, which is 0b00100000 in binary — a single bit. This means code can toggle a letter's case with a fast bitwise XOR against 32 instead of a lookup table.
ASCII's Role Inside UTF-8
UTF-8, the encoding behind almost all modern web text, was deliberately designed so that its first 128 code points are byte-for-byte identical to ASCII. Any valid ASCII file is automatically a valid UTF-8 file, which is why ASCII compatibility still matters in 2026.
Practical Examples
Encoding a Password Character
Finding the numeric code behind a symbol.
- 1.Character: '!'
- 2.Decimal: 33
- 3.Hex: 0x21
- 4.Binary: 00100001
Reading a Hex Dump
Turning raw hex bytes back into text.
- 1.Hex bytes: 48 65 6C 6C 6F
- 2.Decimal: 72 101 108 108 111
- 3.Text: Hello
Common Control Codes You'll Actually See
- 9 (TAB): Horizontal tab
- 10 (LF): Line feed, used by Unix/macOS/Linux
- 13 (CR): Carriage return, combined with LF for Windows line endings
- 27 (ESC): Starts terminal escape sequences
- 127 (DEL): Delete
Quick Ranges to Remember
- 48-57: Digits 0-9
- 65-90: Uppercase A-Z
- 97-122: Lowercase a-z
- 32: Space, the first printable character
Frequently Asked Questions
What is the ASCII table?
ASCII (American Standard Code for Information Interchange) maps 128 characters — control codes, digits, letters and symbols — to the numbers 0-127 used by computers to represent text.
What's the difference between ASCII and Unicode?
ASCII covers only 128 characters (basic English text and control codes). Unicode is a much larger standard covering virtually every writing system and emoji, and is backward-compatible with ASCII for code points 0-127.
What are 'control characters'?
Codes 0-31 and 127 are non-printable control characters used for things like line feeds (LF, 10), carriage returns (CR, 13), and tabs (TAB, 9) — they control text flow rather than displaying a glyph.
How do I convert a character to its ASCII code in JavaScript?
Use 'A'.charCodeAt(0) to get the decimal code, or String.fromCharCode(65) to go the other way.
Why is code 65 the letter 'A'?
ASCII assigns uppercase letters A-Z to decimal 65-90 and lowercase a-z to 97-122, a deliberate 32-value gap that lets you toggle case by flipping a single bit.
What is code 32?
Decimal 32 is the space character — the first printable character in the ASCII table.
Is ASCII still relevant today?
Yes. It's the foundation that UTF-8 is built on (the first 128 UTF-8 code points are identical to ASCII), and it's still used in protocols, file formats, and low-level programming.
What is 0x41 in ASCII?
0x41 is hexadecimal for decimal 65, which is the letter 'A'.