ASCII Table Reference: Character Codes and When You Need Them

Look up any ASCII character code in seconds, understand control characters and encoding differences, and fix invisible-character problems in your text files.

· · 3 minutes · 30 Views · 23 sections
Table of contents
  1. ASCII Table Reference: Character Codes and When You Need Them
  2. What an ASCII Table Actually Shows You
  3. Why the Range Stops at 127
  4. Common Character Codes at a Glance
  5. When You Need an ASCII Table in Practice
  6. Debugging invisible characters
  7. Writing escape sequences
  8. Handling delimiters in data files
  9. Working with sorting and comparison
  10. Building checksums and validation rules
  11. Reading protocol specifications
  12. What Are the Most Common ASCII Codes?
  13. How to Look Up and Use an ASCII Code
  14. ASCII Table Reference for Control Characters
  15. ASCII vs Extended Character Sets and UTF-8
  16. Practical limitations to keep in mind
  17. Frequently Asked Questions
  18. What is ASCII code 65?
  19. Is ASCII still used today?
  20. What is the difference between ASCII and Unicode?
  21. Why does my text file show strange symbols?
  22. How do I type a character by its code?
  23. Conclusion

ASCII Table Reference: Character Codes and When You Need Them

An ASCII table reference is the fastest way to answer a specific question: which number represents a space, why a line break shows up as \n, or what character 65 actually is. This guide gives you the codes, the categories behind them, and the practical situations where looking one up saves you time.

ASCII stands for American Standard Code for Information Interchange. It maps 128 characters to the numbers 0 through 127, and almost every modern text system still builds on that mapping. If you write code, clean data, or debug a file that displays strange symbols, you will meet these numbers eventually.

What an ASCII Table Actually Shows You

An ASCII table is a lookup grid. Each row pairs a decimal number with a character, and most versions also list the hexadecimal and binary equivalents. Decimal matters when you are comparing values in code. Hex matters when you read memory dumps or colour codes. Binary matters when you want to see the bit pattern itself.

The table is split into two halves. Codes 0 to 31 are control characters, which do not print anything visible. Codes 32 to 126 are printable: letters, digits, punctuation and symbols. Code 127 is the delete control character.

Three number bases appear side by side because different tools expect different formats. A programming language may ask for a decimal value, a network protocol may use hex, and a hardware datasheet may show binary. Knowing all three for the character you need removes a conversion step.

Why the Range Stops at 127

Standard ASCII uses seven bits, which gives exactly 128 possible values. Later extensions added an eighth bit to cover accented letters and other scripts. Those extended sets are not ASCII in the strict sense, and mixing them up is a common source of garbled text.

Modern systems mostly use Unicode, which includes ASCII as its first 128 code points. That compatibility is why an ASCII table still works as a reference today. If a character falls inside the original range, its Unicode code point and its ASCII code are the same number.

Common Character Codes at a Glance

Here are the values people look up most often. Decimal, hex and the character itself:

  • 32 (0x20): space
  • 33 (0x21): exclamation mark
  • 34 (0x22): double quote
  • 35 (0x23): hash
  • 36 (0x24): dollar sign
  • 38 (0x26): ampersand
  • 39 (0x27): single quote
  • 40 (0x28): left parenthesis
  • 41 (0x29): right parenthesis
  • 44 (0x2C): comma
  • 46 (0x2E): full stop
  • 48 to 57 (0x30 to 0x39): digits 0 through 9
  • 58 (0x3A): colon
  • 59 (0x3B): semicolon
  • 63 (0x3F): question mark
  • 64 (0x40): at sign
  • 65 to 90 (0x41 to 0x5A): uppercase A through Z
  • 91 (0x5B): left square bracket
  • 95 (0x5F): underscore
  • 97 to 122 (0x61 to 0x7A): lowercase a through z
  • 123 (0x7B): left curly brace
  • 124 (0x7C): vertical bar
  • 126 (0x7E): tilde

Two patterns are worth memorising. Uppercase and lowercase letters sit exactly 32 apart, so adding 32 to an uppercase letter gives its lowercase form. The digits run in order from 48, which means you can convert a digit character to its numeric value by subtracting 48.

If you remember only one thing from this table, remember that 65 is uppercase A and 97 is lowercase a. Those two anchors cover most day-to-day lookups.

For a broader set of text utilities that run without installing anything, the browser-based tools collection covers formatting and conversion tasks.

When You Need an ASCII Table in Practice

The codes matter in more situations than people expect. Here are the ones that come up repeatedly.

Debugging invisible characters

A file that looks correct but fails validation often contains a non-breaking space or a stray tab. Both render as whitespace on screen. Checking the numeric value tells you exactly which character is there.

Writing escape sequences

Many languages and configuration formats use escape sequences such as \n for a newline, \t for a tab and \r for a carriage return. These correspond to control codes 10, 9 and 13. When a sequence behaves unexpectedly, the table tells you what the code actually represents.

Handling delimiters in data files

Comma-separated values break when a field contains a comma. Knowing that comma is 44 and that the quote character is 34 helps you understand how a parser decides where one field ends and the next begins.

Working with sorting and comparison

String comparison in most languages is based on numeric order. That is why uppercase letters sort before lowercase ones. Code 65 comes before code 97, so "Z" sorts before "a" in a plain byte comparison. This surprises people until they see the numbers.

Building checksums and validation rules

Simple validation logic sometimes checks that every character in a field falls within a numeric range. A range check from 48 to 57 confirms digits, and 65 to 90 or 97 to 122 confirms letters.

Reading protocol specifications

Network and file-format specifications often list control codes by number. Knowing that 13 is carriage return and 10 is line feed makes those documents readable.

What Are the Most Common ASCII Codes?

The most frequently used codes are 32 for space, 48 to 57 for the digits, 65 to 90 for uppercase letters, and 97 to 122 for lowercase letters. Control codes 9, 10 and 13 cover tab, line feed and carriage return. Those ranges handle the majority of everyday lookups.

How to Look Up and Use an ASCII Code

Follow these steps when you need a specific value.

  1. Decide whether you need the decimal, hex or binary form. Most programming work uses decimal, while specifications tend to use hex.
  2. Locate the character in the table. Group your search by category first: control codes from 0 to 31, punctuation from 32 to 47 and 58 to 64, digits from 48 to 57, uppercase letters from 65 to 90, and lowercase letters from 97 to 122.
  3. Read across the row to get the value in the base you need.
  4. Test the value in a small script before applying it to a large file. Print the character and confirm it matches what you expected.
  5. If the output looks wrong, check whether your file uses an extended encoding rather than standard ASCII. Values above 127 come from those extensions, not from the base table.

ASCII Table Reference for Control Characters

Control characters are the part of the table people skip, and they are also the part that causes the most confusion. They were designed to instruct teletype machines, and several still do real work today.

CodeHexNameCommon use
00x00NullPadding, string terminators in some languages
70x07BellTerminal alert sound
80x08BackspaceMoves the cursor back
90x09Horizontal tabTab stops in text
100x0ALine feedStarts a new line on Unix-like systems
120x0CForm feedPage break in printing
130x0DCarriage returnReturns the cursor to the start of the line
270x1BEscapeBegins terminal control sequences

The line-ending difference between operating systems comes directly from this table. Unix-like systems end lines with code 10. Older conventions from other platforms used code 13 followed by code 10. That mismatch is the reason a file created on one system can display as one long line on another.

ASCII vs Extended Character Sets and UTF-8

Standard ASCII covers English letters, digits and common punctuation. It does not cover accented characters, currency symbols outside the dollar sign, or any non-Latin script.

Extended sets added codes 128 to 255 to fill that gap. They solved the problem partially and created new ones, because different regions assigned different characters to the same numbers. The same byte could mean two different things depending on which extension was in use.

UTF-8 replaced that patchwork. It encodes the first 128 code points identically to ASCII, then uses multiple bytes for everything else. The practical result is that plain ASCII text is already valid UTF-8. If you only ever handle characters inside the original range, nothing changes. If you handle anything beyond it, the byte count per character grows.

For conversion work, a text and encoding utility can help you inspect what a file actually contains rather than guessing from how it renders.

Practical limitations to keep in mind

A table tells you what a code means, not what your file contains. To confirm the bytes in a specific document you need a hex viewer or a script that reads raw bytes. Also note that displaying a control character may do nothing visible at all, which is exactly why invisible-character problems are hard to spot by eye.

Frequently Asked Questions

What is ASCII code 65?

Code 65 is uppercase A. Uppercase letters run consecutively from 65 for A to 90 for Z. Adding 32 to any uppercase letter's code gives the matching lowercase letter, so lowercase a is 97.

Is ASCII still used today?

Yes. UTF-8 and most modern encodings keep the first 128 values identical to ASCII. That backward compatibility means ASCII codes remain valid and useful even in systems that support the full Unicode range.

What is the difference between ASCII and Unicode?

ASCII defines 128 characters using seven bits. Unicode defines a far larger set covering most of the world's writing systems. Unicode's first 128 code points match ASCII exactly, so the two agree on English text.

Why does my text file show strange symbols?

The file was probably saved in one encoding and opened in another. Bytes above 127 get interpreted differently depending on the assumed encoding. Opening the file with the correct encoding usually resolves it.

How do I type a character by its code?

Many systems let you hold a modifier key and enter the decimal code on the numeric keypad. The exact method depends on your operating system and keyboard layout, so check your platform's documentation for the current shortcut.

Conclusion

An ASCII table reference is a small tool with wide reach. It explains invisible characters, line-ending differences, sorting order and the escape sequences you type every day. Keep the anchor values in mind, remember that the digits start at 48 and that case differs by 32, and you can answer most lookups without a search. When you need to inspect what a file really contains, pair the table with a converter and check the raw bytes rather than trusting the screen.

30 Views ·

Discover More Online Tools

Free text processing, PDF tools, AI writing and more