Skip to content
Private: files never leave your device

ASCII Table

ASCII gives a number from 0 to 127 to every English letter, digit, punctuation mark and a set of control codes. This page lists all 128 codes in decimal, hexadecimal, octal and 7-bit binary, names the 33 control characters, and shows the patterns, such as the gap of 32 between capital and small letters, that let you work out a code without looking it up.

ASCII has 128 codes of 7 bits. Codes 0 to 31 and 127 are control characters, 32 is the space, 48 to 57 are the digits 0 to 9, capital A is 65 and small a is 97

ASCII is a 7-bit code with 128 values, numbered 0 to 127: codes 0 to 31 and 127 are control characters, and codes 32 to 126 are the 95 printable characters, starting with the space at 32. Capital A is 65 (hex 41), small a is 97 (hex 61) and the digit 0 is 48 (hex 30). The table was checked on 27 November 2026 against the code chart in RFC 20, which reproduces the USA Standard Code for Information Interchange of 1968, and against the UTF-8 definition in RFC 3629. Every decimal, hex, octal and binary value below was generated from the code number itself.

Quick facts

Range or characterDecimalHexNotes
Control characters0 to 31, and 12700 to 1F, and 7F33 codes; RFC 20 notes that DEL is strictly not a control character
Space3220The first printable code, normally shown as blank
Digits 0 to 948 to 5730 to 39The value of a digit is its code minus 48
Capital letters A to Z65 to 9041 to 5A26 codes in alphabet order
Small letters a to z97 to 12261 to 7AEach is its capital plus 32
Highest code1277FDEL; ASCII stops here because it uses 7 bits

Patterns that save looking things up

  • Capital and small letters differ by 32. A is 65 and a is 97, Z is 90 and z is 122. In binary, 32 is a single bit, so switching case only flips that one bit: A is 1000001 and a is 1100001.
  • Digits sit at 48 to 57. Subtract 48 from the code of a digit to get its number: 7 is code 55, and 55 minus 48 is 7. In hex the digit simply follows a 3: 7 is hex 37.
  • Letters count from 1 in the low bits. A is hex 41 and a is hex 61, so the second hex digit of the letters A to O and a to o is its place in the alphabet in hex: E is hex 45, the fifth letter.
  • RFC 20 uses column and row numbers. It writes K as 4/11: column 4 is the top three bits (100) and row 11 the bottom four (1011), so K is binary 1001011, decimal 75, hex 4B. To convert a column/row pair, multiply the column by 16 and add the row.

Control characters (0 to 31 and 127)

The names are those in the RFC 20 legend. Most were meant for teleprinters and data links. The ones still met every day are HT (tab, 9), LF (line feed, 10), CR (carriage return, 13), ESC (escape, 27), NUL (0) and DEL (127). RFC 20 marks BS, HT, LF, VT, FF and CR as format effectors, the codes that move the print position, and groups FS, GS, RS and US as information separators for splitting data into files, groups, records and units.

DecHexOctBinaryAbbr.Name
0000000000000NULNull
1010010000001SOHStart of Heading
2020020000010STXStart of Text
3030030000011ETXEnd of Text
4040040000100EOTEnd of Transmission
5050050000101ENQEnquiry
6060060000110ACKAcknowledge
7070070000111BELBell
8080100001000BSBackspace
9090110001001HTHorizontal Tabulation
100A0120001010LFLine Feed
110B0130001011VTVertical Tabulation
120C0140001100FFForm Feed
130D0150001101CRCarriage Return
140E0160001110SOShift Out
150F0170001111SIShift In
16100200010000DLEData Link Escape
17110210010001DC1Device Control 1
18120220010010DC2Device Control 2
19130230010011DC3Device Control 3
20140240010100DC4Device Control 4
21150250010101NAKNegative Acknowledge
22160260010110SYNSynchronous Idle
23170270010111ETBEnd of Transmission Block
24180300011000CANCancel
25190310011001EMEnd of Medium
261A0320011010SUBSubstitute
271B0330011011ESCEscape
281C0340011100FSFile Separator
291D0350011101GSGroup Separator
301E0360011110RSRecord Separator
311F0370011111USUnit Separator
1277F1771111111DELDelete

Printable characters (32 to 126)

DecHexOctBinaryCharacter
32200400100000(space)
33210410100001!
34220420100010"
35230430100011#
36240440100100$
37250450100101%
38260460100110&
39270470100111'
40280500101000(
41290510101001)
422A0520101010*
432B0530101011+
442C0540101100,
452D0550101101-
462E0560101110.
472F0570101111/
483006001100000
493106101100011
503206201100102
513306301100113
523406401101004
533506501101015
543606601101106
553706701101117
563807001110008
573907101110019
583A0720111010:
593B0730111011;
603C0740111100<
613D0750111101=
623E0760111110>
633F0770111111?
64401001000000@
65411011000001A
66421021000010B
67431031000011C
68441041000100D
69451051000101E
70461061000110F
71471071000111G
72481101001000H
73491111001001I
744A1121001010J
754B1131001011K
764C1141001100L
774D1151001101M
784E1161001110N
794F1171001111O
80501201010000P
81511211010001Q
82521221010010R
83531231010011S
84541241010100T
85551251010101U
86561261010110V
87571271010111W
88581301011000X
89591311011001Y
905A1321011010Z
915B1331011011[
925C1341011100\
935D1351011101]
945E1361011110^
955F1371011111_
96601401100000`
97611411100001a
98621421100010b
99631431100011c
100641441100100d
101651451100101e
102661461100110f
103671471100111g
104681501101000h
105691511101001i
1066A1521101010j
1076B1531101011k
1086C1541101100l
1096D1551101101m
1106E1561101110n
1116F1571101111o
112701601110000p
113711611110001q
114721621110010r
115731631110011s
116741641110100t
117751651110101u
118761661110110v
119771671110111w
120781701111000x
121791711111001y
1227A1721111010z
1237B1731111011{
1247C1741111100|
1257D1751111101}
1267E1761111110~
Characters that need care in code Seven printable characters often need escaping: the quotation mark (34), apostrophe (39), ampersand (38), less than (60), greater than (62), backslash (92) and grave accent (96). For their HTML forms see the HTML entities list, or convert text with the HTML Entity Encoder.

ASCII, UTF-8 and extended ASCII

RFC 20 proposed sending 7-bit ASCII inside an 8-bit byte whose highest bit is always 0, so every ASCII byte is between hex 00 and 7F. UTF-8 was designed around that: RFC 3629 says it preserves the full US-ASCII range, and its encoding table puts the characters from U+0000 to U+007F in a single byte of the form 0xxxxxxx. A file that contains only ASCII characters is therefore also a valid UTF-8 file, byte for byte, and the first 128 Unicode code points are the ASCII characters with the same numbers.

Values from 128 to 255 are not ASCII. Tables called extended ASCII show one of several 8-bit code pages that fill those values in different ways, so the same byte can stand for different characters depending on the code page. In UTF-8, the RFC 3629 table shows that every byte from hex 80 upward has its top bit set and only appears as part of a multi-byte character. If accented letters turn into pairs of odd symbols, text saved in one encoding is usually being read as another.

For codes inside web addresses, see the URL encoding characters table, which lists the percent codes built from these same hex values, and the URL Encoder and Decoder. Base64, which turns any bytes into a set of 64 printable ASCII characters, is explained in how much Base64 increases size.

Sources and dates

PageReadUsed for
RFC 20: ASCII format for Network Interchange27 November 2026The code chart, 7 bits in an 8-bit byte with the high bit 0, column and row notation, control character names, DEL note
RFC 3629: UTF-8, a transformation format of ISO 1064627 November 2026UTF-8 preserves the US-ASCII range; U+0000 to U+007F as one byte 0xxxxxxx

Frequently asked questions

What is the ASCII code for A?

Capital A is 65 in decimal, 41 in hex and 1000001 in binary. Small a is 97 in decimal, 61 in hex and 1100001 in binary, 32 higher than the capital.

How many characters are in ASCII?

128, numbered 0 to 127. 33 of them are control characters (0 to 31 and 127) and 95 are printable characters from the space at 32 to the tilde at 126.

What is the ASCII code for a space?

The space is 32 in decimal and 20 in hex. That is why a space in a web address is written as %20 when it is percent encoded.

Is ASCII the same as UTF-8?

Not the same, but compatible. UTF-8 encodes the first 128 Unicode characters as the same single bytes as ASCII, so plain ASCII text is valid UTF-8. UTF-8 then adds multi-byte sequences for every other character.

What is extended ASCII?

A name for 8-bit tables that use the values 128 to 255 for extra letters and symbols. They are not part of ASCII, which stops at 127, and different code pages use those values for different characters.