ASCII Table

All 128 ASCII characters in decimal, hexadecimal, binary and octal.

ASCII (the American Standard Code for Information Interchange) gives each of 128 characters a number from 0 to 127: 33 control codes such as line feed and escape, and 95 printable characters. It is the foundation of text on computers: the first 128 code points of Unicode and UTF-8 are the same.

The table

128 rows
DecimalHexBinaryOctalCharacter
00000000000000NUL (control)
10100000001001SOH (control)
20200000010002STX (control)
30300000011003ETX (control)
40400000100004EOT (control)
50500000101005ENQ (control)
60600000110006ACK (control)
70700000111007BEL (control)
80800001000010BS (control)
90900001001011HT (control)
100A00001010012LF (control)
110B00001011013VT (control)
120C00001100014FF (control)
130D00001101015CR (control)
140E00001110016SO (control)
150F00001111017SI (control)
161000010000020DLE (control)
171100010001021DC1 (control)
181200010010022DC2 (control)
191300010011023DC3 (control)
201400010100024DC4 (control)
211500010101025NAK (control)
221600010110026SYN (control)
231700010111027ETB (control)
241800011000030CAN (control)
251900011001031EM (control)
261A00011010032SUB (control)
271B00011011033ESC (control)
281C00011100034FS (control)
291D00011101035GS (control)
301E00011110036RS (control)
311F00011111037US (control)
322000100000040space
332100100001041!
342200100010042"
352300100011043#
362400100100044$
372500100101045%
382600100110046&
392700100111047'
402800101000050(
412900101001051)
422A00101010052*
432B00101011053+
442C00101100054,
452D00101101055-
462E00101110056.
472F00101111057/
4830001100000600
4931001100010611
5032001100100622
5133001100110633
5234001101000644
5335001101010655
5436001101100666
5537001101110677
5638001110000708
5739001110010719
583A00111010072:
593B00111011073;
603C00111100074<
613D00111101075=
623E00111110076>
633F00111111077?
644001000000100@
654101000001101A
664201000010102B
674301000011103C
684401000100104D
694501000101105E
704601000110106F
714701000111107G
724801001000110H
734901001001111I
744A01001010112J
754B01001011113K
764C01001100114L
774D01001101115M
784E01001110116N
794F01001111117O
805001010000120P
815101010001121Q
825201010010122R
835301010011123S
845401010100124T
855501010101125U
865601010110126V
875701010111127W
885801011000130X
895901011001131Y
905A01011010132Z
915B01011011133[
925C01011100134\
935D01011101135]
945E01011110136^
955F01011111137_
966001100000140`
976101100001141a
986201100010142b
996301100011143c
1006401100100144d
1016501100101145e
1026601100110146f
1036701100111147g
1046801101000150h
1056901101001151i
1066A01101010152j
1076B01101011153k
1086C01101100154l
1096D01101101155m
1106E01101110156n
1116F01101111157o
1127001110000160p
1137101110001161q
1147201110010162r
1157301110011163s
1167401110100164t
1177501110101165u
1187601110110166v
1197701110111167w
1207801111000170x
1217901111001171y
1227A01111010172z
1237B01111011173{
1247C01111100174|
1257D01111101175}
1267E01111110176~
1277F01111111177DEL (control)

Source and notes: ANSI X3.4 / ISO 646 (ASCII); the first 128 code points of Unicode and UTF-8.

How to use this table

  1. Filter on a character, a number or a hex code to find a row.
  2. Use the hex column when reading memory, serial data or a protocol trace.
  3. Use the binary column when checking individual bits.

Worked example

  • The text “Hi” is the two bytes 72 and 105 in decimal, which are 48 69 in hex.
  • Capital “A” is 65 (0x41) and lowercase “a” is 97 (0x61): they differ only in bit 5 (value 32), so setting or clearing that one bit changes the case of a letter.
  • The digit characters “0” to “9” are 48 to 57 (0x30 to 0x39): subtract 48 to turn a digit character into its value.

Notes and cautions

  • Codes above 127 are not ASCII. They belong to extended sets (Latin-1, Windows-1252) or to UTF-8 multi-byte sequences.
  • Line endings differ: Unix uses LF (10), Windows uses CR LF (13 then 10).

FAQ

What is the ASCII code for a space?

32, which is 0x20.

How many characters does ASCII have?

128, numbered 0 to 127, using 7 bits. A byte has 8 bits, so the top bit is unused in pure ASCII.

Sources

  • ANSI X3.4-1986 (ASCII); ISO/IEC 646; The Unicode Standard, Basic Latin block.
  • ANSI X3.4 / ISO 646 (ASCII); the first 128 code points of Unicode and UTF-8.