ToolNimba Browse

🔤 ASCII Table Reference

By ToolNimba Web Dev Team · Updated 2026-06-19

Dec Hex Oct Binary Char Name / description

Codes 0 to 31 and 127 are non-printing control characters, shown by their abbreviation. Code 32 is the space, shown as SP. Click any row to copy the field selected above.

This ASCII table lists every character from 0 to 127 with its decimal, hexadecimal, octal and binary code, the printable glyph, and the name of each control code. Type into the search box to filter by a number (in any base) or by the character itself, then click any row to copy the value you need. It is handy whenever you are debugging encodings, escaping characters, or just want to look up the code for a letter or symbol.

What is the ASCII Table?

ASCII (the American Standard Code for Information Interchange) is a character encoding that maps the numbers 0 to 127 onto letters, digits, punctuation and a set of control codes. It was standardised in the 1960s and remains the foundation of modern text: the first 128 code points of UTF-8 and Unicode are identical to ASCII, so an ASCII file is also a valid UTF-8 file. Because every code fits in 7 bits, ASCII is compact, unambiguous and supported everywhere.

The 128 codes split into two groups. Codes 0 to 31, plus 127, are control characters: they were never meant to be printed but to control devices such as teleprinters and terminals. Familiar examples are 9 (horizontal tab), 10 (line feed, the newline on Unix and macOS) and 13 (carriage return, paired with line feed to end lines on Windows). Codes 32 to 126 are the printable characters: 32 is the space, 48 to 57 are the digits 0 to 9, 65 to 90 are the uppercase letters A to Z, and 97 to 122 are the lowercase letters a to z.

A few patterns make ASCII easy to reason about. Uppercase and lowercase letters are exactly 32 apart, so you can switch case by adding or subtracting 32, or by flipping a single bit (bit 5). The digit characters are not their numeric values: the character '0' is code 48, so to turn a digit character into its number you subtract 48. Knowing the hex codes is useful too, since A is 0x41 and a is 0x61, which is why ASCII art, URL encoding and escape sequences so often show up in hexadecimal.

When to use it

  • Looking up the decimal, hex or binary code for a character while writing or debugging code.
  • Identifying a mysterious control character (such as a stray tab or carriage return) by its code.
  • Building escape sequences or URL-encoded strings that need the hex value of a character.
  • Teaching or learning how text is represented as numbers in computers.
  • Converting between a character and its code in any base without reaching for a calculator.

How to use the ASCII Table

  1. Scroll the table to browse all 128 ASCII characters from 0 to 127.
  2. Type a number (for example 65, 0x41 or 1000001) or a character into the search box to filter the rows.
  3. Choose which field you want to copy (character, decimal, hex, octal or binary) from the dropdown.
  4. Click a row, or focus it and press Enter, to copy that field to your clipboard.

Formula & method

For a character, the decimal code is its position in the ASCII set (0 to 127). Hex = decimal in base 16, octal = base 8, binary = base 2 padded to 8 bits. Uppercase to lowercase: code + 32. Digit character to number: code − 48.

Worked examples

Find every code for the uppercase letter A.

  1. A is the first uppercase letter; its decimal code is 65.
  2. Hex: 65 in base 16 = 41 (4 × 16 + 1 = 65).
  3. Octal: 65 in base 8 = 101 (1 × 64 + 0 × 8 + 1 = 65).
  4. Binary: 65 in base 2 = 1000001, padded to 8 bits = 01000001.

Result: A = decimal 65, hex 0x41, octal 101, binary 01000001

Convert the uppercase letter M to its lowercase form using codes.

  1. M has decimal code 77.
  2. Lowercase letters sit 32 codes after their uppercase pair.
  3. 77 + 32 = 109.
  4. Decimal 109 is the character m.

Result: M (77) + 32 = 109 = m

Turn the digit character '7' into the number 7.

  1. The character '7' is not the value 7; its ASCII code is 55.
  2. The digit characters '0' to '9' run from code 48 to 57.
  3. Subtract the code for 0 (48): 55 − 48 = 7.
  4. The result 7 is now a usable numeric value.

Result: '7' (55) − 48 = 7

Key ASCII ranges and what they cover

Decimal rangeTypeContents
0 to 31ControlNon-printing codes such as NUL, tab (9), line feed (10) and carriage return (13)
32PrintableSpace (SP)
33 to 47PrintablePunctuation and symbols: ! " # $ % & and so on
48 to 57PrintableDigits 0 to 9
58 to 64PrintableMore symbols: colon semicolon less-than equals greater-than question-mark at-sign
65 to 90PrintableUppercase letters A to Z
91 to 96PrintableSymbols: [ backslash ] caret underscore backtick
97 to 122PrintableLowercase letters a to z
123 to 126PrintableSymbols: { | } tilde
127ControlDEL (delete)

Common control codes you will actually meet

DecAbbrMeaning
0NULNull, often a string terminator in C
7BELBell, triggers an alert sound
8BSBackspace
9HTHorizontal tab
10LFLine feed, the newline on Unix and macOS
13CRCarriage return, paired with LF on Windows
27ESCEscape, starts terminal escape sequences

Common mistakes to avoid

  • Treating a digit character as its number. The character '5' is code 53, not the value 5. To get the numeric value from a digit character you subtract 48 (the code for '0'). Forgetting this is a classic off-by-48 bug.
  • Confusing CR and LF. A newline is line feed (code 10) on Unix and macOS, but Windows ends lines with carriage return then line feed (codes 13 and 10). A stray CR is a frequent cause of files that look fine but break parsers.
  • Assuming ASCII covers accented or non-English letters. ASCII only defines 0 to 127, so characters like é, ñ or £ are not in it. Those come from extended encodings or Unicode. If you see odd symbols, the text is probably UTF-8 being read as plain ASCII.
  • Mixing up the case-shift direction. Uppercase codes are lower than lowercase: A is 65 and a is 97. To go from uppercase to lowercase you add 32, not subtract it. Reversing the sign turns letters into unrelated symbols.

Glossary

ASCII
The American Standard Code for Information Interchange, a 7-bit encoding mapping codes 0 to 127 to characters.
Control character
A non-printing code (0 to 31 and 127) that signals an action, such as a tab, newline or bell, rather than a visible glyph.
Printable character
A code from 32 to 126 that represents a visible glyph or the space.
Hexadecimal
Base 16 notation, using digits 0 to 9 and letters A to F. ASCII codes are often shown this way, for example A as 0x41.
Code point
The numeric value assigned to a character. In ASCII the code points run from 0 to 127.
UTF-8
A Unicode encoding whose first 128 code points are identical to ASCII, so plain ASCII text is valid UTF-8.

Frequently asked questions

What is an ASCII table?

An ASCII table lists the 128 characters of the ASCII standard alongside their numeric codes. This one shows the decimal, hexadecimal, octal and binary value for each character (0 to 127), plus the name of every control code, so you can look up or convert any character quickly.

How many characters are in ASCII?

Standard ASCII defines 128 characters, numbered 0 to 127. Codes 0 to 31 and 127 are control characters, code 32 is the space, and codes 33 to 126 are printable letters, digits and symbols. Encodings that add codes 128 to 255 are extended ASCII, not part of the original standard.

What is the ASCII code for A?

The uppercase letter A has the decimal code 65, which is 0x41 in hexadecimal, 101 in octal and 01000001 in binary. The lowercase a is 32 higher at decimal 97 (0x61). You can search for either letter in the table above to copy any of these values.

What are control characters?

Control characters are codes 0 to 31 plus 127 that were designed to control devices rather than print a glyph. Common ones include tab (9), line feed (10, the newline), carriage return (13) and escape (27). The table shows their abbreviation and a short description.

How do I convert a character to its ASCII code?

Find the character in the table and read off the code in the base you need, or search by the character to filter to its row. In code, most languages expose this directly, for example charCodeAt in JavaScript or ord() in Python, which both return the decimal code.

What is the difference between ASCII and Unicode?

ASCII is a small 7-bit set of 128 characters. Unicode is a vastly larger standard covering every writing system, emoji and symbol. Crucially, the first 128 Unicode code points match ASCII exactly, so ASCII is effectively a subset of Unicode and any ASCII text is also valid UTF-8.