ASCII Table: Codes 0-127 in Decimal, Hex, and Binary

Aug 14, 2026

An ASCII table maps each standard character to a number from 0 to 127. It is the quickest way to check the decimal, hexadecimal, or binary value of a letter, digit, punctuation mark, or control code. For example, uppercase A is decimal 65, hexadecimal 41, and binary 1000001.

The complete ASCII code table below uses the original 7-bit standard. It includes all 33 control entries and all 95 printable characters. Use your browser's find command to locate a character, decimal value, or control abbreviation.

Complete ASCII Table from 0 to 127

Standard ASCII table from decimal 0 through 127
DecimalHexBinaryCharacterDescription
0000000000NULNull
1010000001SOHStart of heading
2020000010STXStart of text
3030000011ETXEnd of text
4040000100EOTEnd of transmission
5050000101ENQEnquiry
6060000110ACKAcknowledge
7070000111BELBell
8080001000BSBackspace
9090001001HTHorizontal tab
100A0001010LFLine feed
110B0001011VTVertical tab
120C0001100FFForm feed
130D0001101CRCarriage return
140E0001110SOShift out
150F0001111SIShift in
16100010000DLEData link escape
17110010001DC1Device control 1
18120010010DC2Device control 2
19130010011DC3Device control 3
20140010100DC4Device control 4
21150010101NAKNegative acknowledge
22160010110SYNSynchronous idle
23170010111ETBEnd of transmission block
24180011000CANCancel
25190011001EMEnd of medium
261A0011010SUBSubstitute
271B0011011ESCEscape
281C0011100FSFile separator
291D0011101GSGroup separator
301E0011110RSRecord separator
311F0011111USUnit separator
32200100000SPSpace
33210100001!Exclamation mark
34220100010"Double quote
35230100011#Number sign
36240100100$Dollar sign
37250100101%Percent sign
38260100110&Ampersand
39270100111'Apostrophe
40280101000(Left parenthesis
41290101001)Right parenthesis
422A0101010*Asterisk
432B0101011+Plus sign
442C0101100,Comma
452D0101101-Hyphen-minus
462E0101110.Period
472F0101111/Slash
483001100000Digit 0
493101100011Digit 1
503201100102Digit 2
513301100113Digit 3
523401101004Digit 4
533501101015Digit 5
543601101106Digit 6
553701101117Digit 7
563801110008Digit 8
573901110019Digit 9
583A0111010:Colon
593B0111011;Semicolon
603C0111100<Less-than sign
613D0111101=Equals sign
623E0111110>Greater-than sign
633F0111111?Question mark
64401000000@At sign
65411000001AUppercase letter A
66421000010BUppercase letter B
67431000011CUppercase letter C
68441000100DUppercase letter D
69451000101EUppercase letter E
70461000110FUppercase letter F
71471000111GUppercase letter G
72481001000HUppercase letter H
73491001001IUppercase letter I
744A1001010JUppercase letter J
754B1001011KUppercase letter K
764C1001100LUppercase letter L
774D1001101MUppercase letter M
784E1001110NUppercase letter N
794F1001111OUppercase letter O
80501010000PUppercase letter P
81511010001QUppercase letter Q
82521010010RUppercase letter R
83531010011SUppercase letter S
84541010100TUppercase letter T
85551010101UUppercase letter U
86561010110VUppercase letter V
87571010111WUppercase letter W
88581011000XUppercase letter X
89591011001YUppercase letter Y
905A1011010ZUppercase letter Z
915B1011011[Left square bracket
925C1011100\Backslash
935D1011101]Right square bracket
945E1011110^Caret
955F1011111_Underscore
96601100000`Grave accent
97611100001aLowercase letter a
98621100010bLowercase letter b
99631100011cLowercase letter c
100641100100dLowercase letter d
101651100101eLowercase letter e
102661100110fLowercase letter f
103671100111gLowercase letter g
104681101000hLowercase letter h
105691101001iLowercase letter i
1066A1101010jLowercase letter j
1076B1101011kLowercase letter k
1086C1101100lLowercase letter l
1096D1101101mLowercase letter m
1106E1101110nLowercase letter n
1116F1101111oLowercase letter o
112701110000pLowercase letter p
113711110001qLowercase letter q
114721110010rLowercase letter r
115731110011sLowercase letter s
116741110100tLowercase letter t
117751110101uLowercase letter u
118761110110vLowercase letter v
119771110111wLowercase letter w
120781111000xLowercase letter x
121791111001yLowercase letter y
1227A1111010zLowercase letter z
1237B1111011{Left brace
1247C1111100|Vertical bar
1257D1111101}Right brace
1267E1111110~Tilde
1277F1111111DELDelete

How to Read the ASCII Table

Every row represents one code point written in several forms:

  • Decimal is the familiar base-10 number, from 0 through 127.
  • Hex is the base-16 form, written with digits 0-9 and letters A-F.
  • Binary is the 7-bit base-2 form, padded with leading zeros in this ASCII chart.
  • Character shows a printable character or the accepted abbreviation for a control code.
  • Description explains the symbol or control function.

Consider the row for uppercase A in the ASCII table. Decimal 65 converts to hexadecimal 41 and binary 1000001. Those three values do not identify different characters; they are different numerical notations for the same ASCII character. In an 8-bit byte, software commonly stores the same binary value as 01000001, adding one leading zero without changing the value.

If you want to verify a conversion outside the table, enter 65 in the decimal to binary converter. You can also enter 1000001 in the binary to decimal converter to recover 65.

What Standard ASCII Contains

ASCII stands for American Standard Code for Information Interchange. Standard ASCII assigns 128 codes because seven binary digits provide exactly 2^7 = 128 patterns. Its range is therefore decimal 0-127, hexadecimal 00-7F, or binary 0000000-1111111.

The range has two main parts:

RangeHex rangePurpose
0-3100-1FControl characters
32-12620-7EPrintable characters
1277FDelete control character

The printable section contains the English alphabet in uppercase and lowercase, ten digits, a space, and common punctuation. It does not contain accented letters, emoji, Chinese characters, or most writing systems. Modern text uses Unicode encodings such as UTF-8 for that broader character set, while retaining the first 128 values in the same positions as ASCII.

ASCII Control Characters

Codes 0-31 and 127 do not normally draw a visible glyph. They were designed to control terminals, printers, data links, and the structure of transmitted records. Some are mostly historical, but several still affect everyday files and protocols.

Common control characters include:

  • NUL (0) represents a null value. C-style strings traditionally use it as an end marker.
  • BEL (7) originally triggered an audible terminal bell and can still represent an alert.
  • BS (8) is backspace.
  • HT (9) is the horizontal tab, commonly written as \t in source code.
  • LF (10) is line feed, commonly written as \n.
  • CR (13) is carriage return, commonly written as \r.
  • ESC (27) begins escape sequences in terminals and communication formats.
  • DEL (127) is the delete control character.

Line endings are the control-code detail developers encounter most often. Unix and modern macOS text files generally separate lines with LF. Windows commonly uses the two-code sequence CR followed by LF. Older classic Mac systems used CR alone. A file can look correct in one editor but produce extra blank lines or a single long line elsewhere when these conventions are interpreted incorrectly.

Control abbreviations in the ASCII table are display labels, not literal multi-letter file content. The table entry LF, for instance, identifies one code with decimal value 10. A text file does not need to contain the two printable letters L and F to create a line feed.

Printable ASCII Characters

Printable ASCII begins with space at decimal 32 and ends with tilde at decimal 126. The ordering is intentional enough to make several conversions and validation rules easy.

Digits 0 through 9

The ASCII digits occupy one continuous range from decimal 48 to 57, or hexadecimal 30-39.

CharacterDecimalHexBinary
048300110000
149310110001
553350110101
957390111001

The character '5' and the numeric value 5 are not the same stored value. The ASCII character '5' has code 53. Software that reads numeric text must interpret the character and convert it to a mathematical number before arithmetic. For an ASCII digit, subtracting the code for '0' from its code yields the represented number: 53 - 48 = 5.

Uppercase Letters A through Z

Uppercase letters occupy decimal 65-90, hexadecimal 41-5A. Because the range is continuous, the next letter always has a code one greater than the previous letter. A is 65, B is 66, and Z is 90.

This sequence makes alphabet indexing straightforward. If A is position zero, subtract 65 from an uppercase letter's ASCII code. The code for D is 68, so 68 - 65 = 3.

Lowercase Letters a through z

Lowercase letters occupy decimal 97-122, hexadecimal 61-7A. Each lowercase English letter is exactly 32 decimal positions after its uppercase counterpart:

A = 65  = 0x41 = 1000001
a = 97  = 0x61 = 1100001
Difference = 32 = 0x20

That layout explains why older low-level code sometimes changed ASCII letter case by manipulating the bit with value 32. Production software should normally use language-aware case-conversion functions, because that shortcut applies only to the ASCII English alphabet and does not handle Unicode text correctly.

Punctuation and Symbols

Punctuation fills the gaps around the digit and letter blocks. Space is 32, exclamation mark is 33, and slash is 47. The symbols from colon through at sign use codes 58-64. Square brackets, backslash, caret, underscore, and grave accent appear at 91-96. Braces, vertical bar, and tilde close the printable range at 123-126.

These positions matter in source code, URLs, data formats, and network protocols. A space is often transformed because literal spaces are inconvenient in some formats; knowing that its ASCII hexadecimal value is 20 explains the familiar URL encoding %20.

Converting an ASCII Code Between Bases

The ASCII table is a lookup reference, but the values also follow ordinary base conversion rules. Reading an ASCII table becomes easier when you can move between those bases. To express decimal 65 in binary, decompose it into powers of two:

65 = 64 + 1
   = 2^6 + 2^0
   = 1000001 in binary

To express the same value in hexadecimal, divide the binary digits into four-bit groups from the right. Pad the left group when necessary:

Binary:  0100 0001
Hex:        4    1
Result:       0x41

Hexadecimal is common in debugging because one hex digit maps exactly to four bits. Binary reveals the bit pattern directly, while decimal is often easier for human arithmetic. The binary table gives a broader number chart across binary, decimal, octal, and hexadecimal; this ASCII chart adds the character meaning assigned to each value.

ASCII Text as a Sequence of Numbers

A string is represented by a sequence of character codes. In standard ASCII, the word CAT becomes:

CharacterDecimalHex8-bit display
C674301000011
A654101000001
T845401010100

The resulting hex sequence is 43 41 54, and the byte-form binary sequence is 01000011 01000001 01010100. Character boundaries matter. Treating the entire bit sequence as one large integer loses the fact that the data represents three characters.

ASCII itself defines character values, not the visual font, color, or layout. A renderer chooses how C, A, and T look. Formatting formats then add rules for paragraphs, styles, images, and other structure.

ASCII, Extended ASCII, Unicode, and UTF-8

Standard ASCII has one unambiguous 0-127 table. The phrase extended ASCII is less precise. It often refers to one of several incompatible 8-bit code pages that reuse values 0-127 for ASCII and assign regional characters or drawing symbols to 128-255. A byte above 127 cannot be decoded reliably unless you know which code page was used.

Unicode solves the broader assignment problem by giving characters code points across many scripts and symbol sets. UTF-8 is an encoding that turns those code points into bytes. UTF-8 deliberately represents Unicode code points 0-127 as the same single-byte values used by ASCII. Therefore every valid ASCII file is also valid UTF-8, but a UTF-8 file containing non-ASCII characters is not an ASCII-only file.

Do not assume one character always equals one byte. That is true for ASCII characters in UTF-8, but many other Unicode characters require two, three, or four bytes. It is also possible for what a reader perceives as one displayed symbol to contain multiple Unicode code points.

Practical Uses for an ASCII Code Table

An ASCII table remains useful even in Unicode-based systems:

  • Inspecting text and protocol bytes in a hex dump.
  • Checking escape characters, delimiters, and line endings.
  • Validating whether input is restricted to basic ASCII.
  • Converting character literals to numbers in programming exercises.
  • Understanding URL encoding and other percent-encoded data.
  • Reading legacy file formats and serial communication logs.
  • Debugging differences between a numeric digit and its text representation.

When inspecting an unknown file, first decide whether the values represent text, raw numbers, or another binary structure. The same byte 41 can mean decimal 65, the ASCII letter A, part of an image, or one field in a machine instruction. The surrounding format determines the interpretation.

Common ASCII Table Mistakes

The first common mistake is calling every 8-bit code page ASCII. Standard ASCII stops at 127. Values 128-255 require an explicitly named encoding.

The second is confusing a digit with its value. ASCII '0' is decimal 48, not zero. The third is omitting the number base: 41 means forty-one in decimal but represents sixty-five when read as hexadecimal 0x41. Prefixes such as 0x for hex and 0b for binary remove ambiguity.

Finally, leading zeros do not change a mathematical value. The table uses seven bits because ASCII is a 7-bit standard. Byte-oriented displays usually show eight bits, so 1000001 and 01000001 identify the same code.

Frequently Asked Questions

Is ASCII 7-bit or 8-bit?

Standard ASCII is 7-bit and contains 128 codes, numbered 0-127. Computers usually store an ASCII character in an 8-bit byte with the highest bit set to zero. Various 8-bit extensions exist, but they are separate code pages rather than one universal extended ASCII standard.

What is ASCII code 32?

Decimal 32, hexadecimal 20, is the space character. It is printable in the sense that it creates spacing, although it has no visible ink shape.

What is ASCII code 65?

Decimal 65 is uppercase A. Its hexadecimal value is 41, its 7-bit binary value is 1000001, and its common 8-bit display is 01000001.

What is ASCII code 97?

Decimal 97 is lowercase a. Its hexadecimal value is 61 and its binary value is 1100001.

What are the ASCII codes for a new line?

LF is decimal 10 and CR is decimal 13. Unix-style text uses LF, while Windows-style text generally uses CR followed by LF. The application and file format determine which sequence is expected.

Is ASCII the same as Unicode?

No. ASCII is a 128-character set. Unicode covers a much larger collection of writing systems and symbols. Unicode encodings such as UTF-8 preserve ASCII's values for the first 128 code points, which provides compatibility without making the two standards identical.

Quick ASCII Reference

Remember the key boundaries: controls begin at 0, space is 32, digits are 48-57, uppercase letters are 65-90, lowercase letters are 97-122, tilde is 126, and delete is 127. Keep this ASCII table available whenever you need the exact decimal, hexadecimal, or binary form of a character, and use the conversion tools when you need to show the arithmetic behind a value.

Admin

Admin