The 128 codes, generated

ASCII table

The complete ASCII table, 0 to 127, with decimal, hexadecimal, binary and the name of each control character. The 95 printable characters come straight from the browser's character table; the33 control names are the ones recorded in the Unicode character database.

How to read the table

Each row is one code. The first column is the decimal number, the form seen in books and error messages. Beside it sit the same number in hexadecimal, as it appears in programming tools, and in binary, as it exists in memory. Capital A is code 65, 41 in hex and01000001 in binary; lowercase a is 97, 32 higher, and the difference between them is a single bit. The digit zero is code 48, not zero: the table numbers symbols, not values.

The 33 control codes, 0 to 31 and the last one, 127, print nothing. They are commands for the device receiving the text, almost always a teletype: advance the line, return the carriage, ring the bell, delete. They appear in the table with the abbreviation used since the sixties and the full name, which is the name the Unicode standard records for the same code. Code zero, NUL, still marks the end of a string in several programming languages.

What the table lacks is any letter outside the English alphabet. Cedillas, tildes and accents were left to national extensions and, later, to Unicode. The binary page shows how UTF-8 fits those characters in without changing a single code of this table.

Table

128 codes, generated by the package
DecHexBinaryCharacterName
00000000000NULNULL
10100000001SOHSTART OF HEADING
20200000010STXSTART OF TEXT
30300000011ETXEND OF TEXT
40400000100EOTEND OF TRANSMISSION
50500000101ENQENQUIRY
60600000110ACKACKNOWLEDGE
70700000111BELALERT
80800001000BSBACKSPACE
90900001001HTCHARACTER TABULATION
100A00001010LFLINE FEED
110B00001011VTLINE TABULATION
120C00001100FFFORM FEED
130D00001101CRCARRIAGE RETURN
140E00001110SOSHIFT OUT
150F00001111SISHIFT IN
161000010000DLEDATA LINK ESCAPE
171100010001DC1DEVICE CONTROL ONE
181200010010DC2DEVICE CONTROL TWO
191300010011DC3DEVICE CONTROL THREE
201400010100DC4DEVICE CONTROL FOUR
211500010101NAKNEGATIVE ACKNOWLEDGE
221600010110SYNSYNCHRONOUS IDLE
231700010111ETBEND OF TRANSMISSION BLOCK
241800011000CANCANCEL
251900011001EMEND OF MEDIUM
261A00011010SUBSUBSTITUTE
271B00011011ESCESCAPE
281C00011100FSINFORMATION SEPARATOR FOUR
291D00011101GSINFORMATION SEPARATOR THREE
301E00011110RSINFORMATION SEPARATOR TWO
311F00011111USINFORMATION SEPARATOR ONE
322000100000SPSPACE
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?
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_
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~
1277F01111111DELDELETE

The control names and where they come from

The control abbreviations are those of the 1967 ASCII table itself, the ones in any terminal manual. The full name beside each is the one recorded in the Unicode character database for the same code. In one case the historical abbreviation and Unicode's differ, and the table keeps the historical one, which is the one readers look for.

Frequently asked

What is the ASCII table?

The agreement, first published in 1963 and completed with the lowercase letters in 1967, that gave a number from 0 to 127 to every letter of the English alphabet, the digits, punctuation and 33 control codes. Capital A is code 65, lowercase a is 97, the space is 32. Nearly every text encoding in use today begins with those 128 codes.

What are the control characters?

The 33 codes that print nothing and instead command the device: LF (LINE FEED) moves to a new line, CR (CARRIAGE RETURN) returns to the start of the line, ESC (ESCAPE) begins a command sequence, BEL (ALERT) rang the terminal's bell. The names come from the teletypes and paper tapes of the sixties, and some are still in daily use, like the line feed.

Where are the accented letters?

Outside the table. ASCII has only the letters of English, and each country invented a different extension for the rest of the byte, which produced the familiar garbled text. Unicode settled it by numbering every character of every script, and UTF-8 writes those numbers so that the 128 ASCII codes stay exactly as they were. The binary page shows how an accent becomes two bytes.

How do I convert a letter to its ASCII code?

Find the letter in the table and read the decimal, the hexadecimal or the binary, whichever you need. The box at the top does it for a whole text: Hi with an exclamation mark becomes 72 105 33, one code per character. Characters outside the table, such as accented letters, are left out and the box says so.