ASCII Table

All 128 ASCII characters with their codes in binary, decimal and hex. Search for a character, or print the chart.

DecHexBinaryChar
00000000000NUL
10100000001SOH
20200000010STX
30300000011ETX
40400000100EOT
50500000101ENQ
60600000110ACK
70700000111BEL
80800001000BS
90900001001HT
100A00001010LF
110B00001011VT
120C00001100FF
130D00001101CR
140E00001110SO
150F00001111SI
161000010000DLE
171100010001DC1
181200010010DC2
191300010011DC3
201400010100DC4
211500010101NAK
221600010110SYN
231700010111ETB
241800011000CAN
251900011001EM
261A00011010SUB
271B00011011ESC
281C00011100FS
291D00011101GS
301E00011110RS
311F00011111US
DecHexBinaryChar
322000100000SP
332100100001!
342200100010"
352300100011#
362400100100$
372500100101%
382600100110&
392700100111'
402800101000(
412900101001)
422A00101010*
432B00101011+
442C00101100,
452D00101101-
462E00101110.
472F00101111/
4830001100000
4931001100011
5032001100102
5133001100113
5234001101004
5335001101015
5436001101106
5537001101117
5638001110008
5739001110019
583A00111010:
593B00111011;
603C00111100<
613D00111101=
623E00111110>
633F00111111?
DecHexBinaryChar
644001000000@
654101000001A
664201000010B
674301000011C
684401000100D
694501000101E
704601000110F
714701000111G
724801001000H
734901001001I
744A01001010J
754B01001011K
764C01001100L
774D01001101M
784E01001110N
794F01001111O
805001010000P
815101010001Q
825201010010R
835301010011S
845401010100T
855501010101U
865601010110V
875701010111W
885801011000X
895901011001Y
905A01011010Z
915B01011011[
925C01011100\
935D01011101]
945E01011110^
955F01011111_
DecHexBinaryChar
966001100000`
976101100001a
986201100010b
996301100011c
1006401100100d
1016501100101e
1026601100110f
1036701100111g
1046801101000h
1056901101001i
1066A01101010j
1076B01101011k
1086C01101100l
1096D01101101m
1106E01101110n
1116F01101111o
1127001110000p
1137101110001q
1147201110010r
1157301110011s
1167401110100t
1177501110101u
1187601110110v
1197701110111w
1207801111000x
1217901111001y
1227A01111010z
1237B01111011{
1247C01111100|
1257D01111101}
1267E01111110~
1277F01111111DEL

Shaded rows are control characters: codes that tell a device what to do instead of printing a symbol. What each one means is listed below.

What ASCII is

ASCII, the American Standard Code for Information Interchange, gives a number to each of 128 characters: the letters A to Z in both cases, the digits, punctuation, the space and 33 control codes. It was first published in 1963, revised in 1967 and last updated in 1986, and Unicode, which most text uses today, starts with the same 128 codes.

The codes run from 0 to 127, which fits in seven bits. Computers store each one in an eight-bit byte, so the table shows eight binary digits with a leading 0.

How to read the table

  • Dec is the code as an ordinary number.
  • Hex is the same number in hexadecimal, often written 0x41 or 41h.
  • Binary is how the byte is stored: 01000001 for A.
  • Char is the character. The shaded rows are control characters, which have no symbol and are shown by their short name.

Type in the Find box to jump to a character, a code in decimal, hex (0x41) or binary, or a control character's name such as tab. To turn whole words into these codes, use the binary translator.

Patterns worth knowing

  • Digits are 48 to 57, so a digit's value is its code minus 48, and in hex 0x30 to 0x39.
  • Uppercase letters are 65 to 90 and lowercase 97 to 122. Each lowercase letter is its capital plus 32, one bit (00100000), so changing case flips a single bit.
  • Space is 32, the first printable character, and ~ at 126 is the last. That makes 95 printable characters, space included.
  • Control key combinations follow the letters: holding Ctrl takes 64 off the letter's code, so Ctrl+G is 7 (bell), Ctrl+H is 8 (backspace), Ctrl+I is 9 (tab) and Ctrl+M is 13 (carriage return).
  • DEL is 127, all seven bits set. On paper tape it was used to punch out every hole over a mistake, so the reader would skip it.

Control characters

Codes 0 to 31 and 127 were made to control teleprinters and terminals rather than to print. Most are rarely used now, but a few are everywhere: tab (9), line feed (10), carriage return (13) and escape (27). Windows ends a line of text with a carriage return and a line feed, while macOS and Linux use the line feed alone.

DecNameMeaning
0NULNull
1SOHStart of heading
2STXStart of text
3ETXEnd of text
4EOTEnd of transmission
5ENQEnquiry
6ACKAcknowledge
7BELBell
8BSBackspace
9HTHorizontal tab
10LFLine feed
11VTVertical tab
12FFForm feed
13CRCarriage return
14SOShift out
15SIShift in
16DLEData link escape
17DC1Device control 1 (XON)
18DC2Device control 2
19DC3Device control 3 (XOFF)
20DC4Device control 4
21NAKNegative acknowledge
22SYNSynchronous idle
23ETBEnd of transmission block
24CANCancel
25EMEnd of medium
26SUBSubstitute
27ESCEscape
28FSFile separator
29GSGroup separator
30RSRecord separator
31USUnit separator
127DELDelete

What about codes 128 to 255?

ASCII stops at 127. The “extended ASCII” charts that fill 128 to 255 are other standards that added their own characters there, and they do not agree: ISO 8859-1 (Latin-1), Windows-1252 and the original IBM PC's code page 437 all put different characters on the same numbers. Today most text is Unicode, written as UTF-8, where 128 to 255 are not characters on their own but parts of the two- to four-byte codes for everything beyond ASCII. Because UTF-8 keeps ASCII's single bytes unchanged, plain ASCII text is also valid UTF-8.

Printing the ASCII table

Press Print the table for the whole chart on one page, four columns of 32 codes. Choose Save as PDF in the print window to keep a copy.

Frequently asked questions

How many characters are in ASCII?

128, numbered 0 to 127. 95 of them are printable (letters, digits, punctuation and the space) and 33 are control characters.

What is the ASCII code for A?

65 in decimal, 41 in hex and 01000001 in binary. Lowercase a is 97, hex 61, binary 01100001.

What is the ASCII code for a space?

32, hex 20, binary 00100000.

Is ASCII 7-bit or 8-bit?

ASCII is a 7-bit code: 128 characters need seven bits. Computers keep each character in an 8-bit byte with the first bit set to 0.

What is the difference between ASCII and Unicode?

ASCII has 128 characters, enough for English. Unicode covers the world's writing systems and emoji, and its first 128 characters are ASCII with the same numbers. In UTF-8, the usual way to store Unicode, those 128 still take one byte each.

What is extended ASCII?

A name for 8-bit character sets that use codes 128 to 255 for extra characters. There are several, such as Latin-1, Windows-1252 and code page 437, and they disagree about which character goes where, so there is no single extended ASCII table.

Can I print the ASCII table?

Yes. Press Print the table to get all 128 codes on one page.