ASCII Table: Complete ASCII Character Codes Chart & Lookup

Code Character Name HTML Entity

How to Use This ASCII Table

This ASCII table provides quick reference to all standard ASCII character codes. Here's how to use it:

  1. Browse the Table: Scroll through the complete ASCII table showing all character codes from 0-127.
  2. Search for a Character: Type any character in the search box to find its ASCII code. For example, type "A" to find the ASCII code for uppercase A (65).
  3. Find HTML Entity: Each character shows its HTML entity equivalent, useful for HTML and web development.
  4. Copy ASCII Codes: Use the codes directly in your programming or web development projects.
  5. Reference Character Names: The table includes the official name for each ASCII character, which is useful for understanding control characters.

Pro tip: Use this ASCII table when you need to encode special characters in URLs, escape sequences in code, or HTML entities in web pages.

What is an ASCII Table?

An ASCII table is a reference chart showing all characters in the American Standard Code for Information Interchange (ASCII). It maps numeric codes (0-127) to their corresponding characters, making it easy to find character codes for programming and web development.

Why You Need an ASCII Table

When working with text in programming, you often need to know character codes. An ASCII table eliminates the need to memorize codes or search through documentation. Having a complete ASCII table at your fingertips accelerates development.

ASCII Table vs. Unicode Table

While both are character encoding systems, they differ significantly:

  • ASCII Table: Shows 128 standard characters (0-127). Covers English letters, numbers, and common symbols.
  • Unicode Table: Shows 1,000,000+ characters for all world languages. Much more comprehensive but also more complex.

Use an ASCII table for basic programming and web development. Use Unicode when working with international text or special symbols.

Who Uses ASCII Tables?

This tool is used by:

  • Programmers: To reference character codes in escape sequences and string manipulation.
  • Web Developers: To find HTML entity codes for special characters in HTML and CSS.
  • Students: Learning programming fundamentals and character encoding.
  • Network Engineers: Understanding binary data transmission and character encoding.

How ASCII Character Codes Work

ASCII assigns numeric codes to characters, allowing computers to represent text as numbers. Each character code is a number from 0-127.

ASCII Code Ranges

  • 0-31: Control characters (non-printable, used for device control)
  • 32-47: Space and punctuation symbols (!, @, #, etc.)
  • 48-57: Digits 0-9
  • 58-64: Punctuation (:, ;, =, etc.)
  • 65-90: Uppercase letters A-Z
  • 91-96: Punctuation ([, \, ], etc.)
  • 97-122: Lowercase letters a-z
  • 123-127: Punctuation and DEL character

Example: Finding the ASCII Code for "A"

To find the ASCII code for uppercase "A":

  1. Look in the "Uppercase letters" range (65-90)
  2. A is the 1st uppercase letter, so: 65 + 0 = 65
  3. ASCII Code for A = 65
  4. HTML Entity = A

Using ASCII Codes in Programming

ASCII codes are used for:

  • String manipulation: char = chr(65) returns "A" in Python
  • URL encoding: Space becomes %20, special chars are encoded
  • HTML entities: A displays as "A" in browsers
  • Binary transmission: Characters are converted to 8-bit binary for network transmission

Frequently Asked Questions About ASCII

Why does ASCII only go up to 127?

ASCII was designed in the 1960s for English text. It uses 7 bits (0-127) because that was efficient for early computers. Extended ASCII (128-255) was later added, and Unicode was created to support all world languages.

What are control characters (0-31)?

Control characters are non-printable codes that control devices. For example, code 10 is "Line Feed" (new line), code 13 is "Carriage Return" (return to line start). They're not visible but affect how text displays.

How do I use ASCII codes in HTML?

Use HTML entities: A displays as "A". For special characters, use named entities like   for non-breaking space or © for ©.

What's the difference between ASCII and UTF-8?

ASCII is a 7-bit encoding for 128 characters. UTF-8 is a variable-width encoding that includes all Unicode characters (millions of them). UTF-8 is backward compatible with ASCII—ASCII characters have the same codes in UTF-8.

Do I need to memorize ASCII codes?

No! That's why ASCII tables exist. Most programmers use tables or their IDE's built-in tools to look up codes rather than memorizing them.

ASCII Code Examples & Common Uses

Example 1: URL Encoding

Situation: You want to send a space character in a URL query string.

Solution: Space is ASCII code 32, encoded as %20 in URLs.

URL: example.com?q=hello%20world

Display: The URL decodes to "hello world" in search results.

Example 2: HTML Entity for Special Character

Situation: You want to display a copyright symbol © in HTML.

Solution: Use the HTML entity © (named) or © (numeric)

Display: Browser renders it as ©

Example 3: Converting Text to ASCII in Programming

Situation: You need to convert the string "Hello" to ASCII codes in Python.

Code: [ord(char) for char in "Hello"]

Result: [72, 101, 108, 108, 111]

Insight: This is how programs convert text to binary for storage or transmission.

Below Content Ad