All Tools

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

All 128 ASCII codes with decimal, hex, octal, binary, HTML entity, character and control-code names such as LF Line Feed. Filter by class, sort any column, view Windows-1252 128 to 255, copy as text or CSV. Nothing is uploaded.

Show

128 of 128 codes

ASCII codes 0 to 127
0000000000000�NULNull
1010010000001SOHStart of Heading
2020020000010STXStart of Text
3030030000011ETXEnd of Text
4040040000100EOTEnd of Transmission
5050050000101ENQEnquiry
6060060000110ACKAcknowledge
7070070000111BELBell
8080100001000BSBackspace
9090110001001	HTHorizontal Tab
100A0120001010
LFLine Feed
110B0130001011VTVertical Tab
120C0140001100FFForm Feed
130D0150001101
CRCarriage Return
140E0160001110SOShift Out
150F0170001111SIShift In
16100200010000DLEData Link Escape
17110210010001DC1Device Control 1 (XON)
18120220010010DC2Device Control 2
19130230010011DC3Device Control 3 (XOFF)
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
32200400100000 SPSpace
33210410100001!!Exclamation mark
34220420100010""Quotation mark
35230430100011##Number sign
36240440100100$$Dollar sign
37250450100101%%Percent sign
38260460100110&&Ampersand
39270470100111''Apostrophe
40280500101000((Left parenthesis
41290510101001))Right parenthesis
422A0520101010**Asterisk
432B0530101011++Plus sign
442C0540101100,,Comma
452D0550101101--Hyphen-minus
462E0560101110..Full stop
472F0570101111//Solidus (slash)
4830060011000000Digit zero
4931061011000111Digit one
5032062011001022Digit two
5133063011001133Digit three
5234064011010044Digit four
5335065011010155Digit five
5436066011011066Digit six
5537067011011177Digit seven
5638070011100088Digit eight
5739071011100199Digit nine
583A0720111010::Colon
593B0730111011&#59;;Semicolon
603C0740111100&lt;<Less-than sign
613D0750111101&#61;=Equals sign
623E0760111110&gt;>Greater-than sign
633F0770111111&#63;?Question mark
64401001000000&#64;@Commercial at
65411011000001&#65;ALatin capital letter A
66421021000010&#66;BLatin capital letter B
67431031000011&#67;CLatin capital letter C
68441041000100&#68;DLatin capital letter D
69451051000101&#69;ELatin capital letter E
70461061000110&#70;FLatin capital letter F
71471071000111&#71;GLatin capital letter G
72481101001000&#72;HLatin capital letter H
73491111001001&#73;ILatin capital letter I
744A1121001010&#74;JLatin capital letter J
754B1131001011&#75;KLatin capital letter K
764C1141001100&#76;LLatin capital letter L
774D1151001101&#77;MLatin capital letter M
784E1161001110&#78;NLatin capital letter N
794F1171001111&#79;OLatin capital letter O
80501201010000&#80;PLatin capital letter P
81511211010001&#81;QLatin capital letter Q
82521221010010&#82;RLatin capital letter R
83531231010011&#83;SLatin capital letter S
84541241010100&#84;TLatin capital letter T
85551251010101&#85;ULatin capital letter U
86561261010110&#86;VLatin capital letter V
87571271010111&#87;WLatin capital letter W
88581301011000&#88;XLatin capital letter X
89591311011001&#89;YLatin capital letter Y
905A1321011010&#90;ZLatin capital letter Z
915B1331011011&#91;[Left square bracket
925C1341011100&#92;\Reverse solidus (backslash)
935D1351011101&#93;]Right square bracket
945E1361011110&#94;^Circumflex accent
955F1371011111&#95;_Low line (underscore)
96601401100000&#96;`Grave accent (backtick)
97611411100001&#97;aLatin small letter a
98621421100010&#98;bLatin small letter b
99631431100011&#99;cLatin small letter c
100641441100100&#100;dLatin small letter d
101651451100101&#101;eLatin small letter e
102661461100110&#102;fLatin small letter f
103671471100111&#103;gLatin small letter g
104681501101000&#104;hLatin small letter h
105691511101001&#105;iLatin small letter i
1066A1521101010&#106;jLatin small letter j
1076B1531101011&#107;kLatin small letter k
1086C1541101100&#108;lLatin small letter l
1096D1551101101&#109;mLatin small letter m
1106E1561101110&#110;nLatin small letter n
1116F1571101111&#111;oLatin small letter o
112701601110000&#112;pLatin small letter p
113711611110001&#113;qLatin small letter q
114721621110010&#114;rLatin small letter r
115731631110011&#115;sLatin small letter s
116741641110100&#116;tLatin small letter t
117751651110101&#117;uLatin small letter u
118761661110110&#118;vLatin small letter v
119771671110111&#119;wLatin small letter w
120781701111000&#120;xLatin small letter x
121791711111001&#121;yLatin small letter y
1227A1721111010&#122;zLatin small letter z
1237B1731111011&#123;{Left curly bracket
1247C1741111100&#124;|Vertical line
1257D1751111101&#125;}Right curly bracket
1267E1761111110&#126;~Tilde
1277F1771111111&#127;DELDelete

About the ASCII Table

The ASCII Table lists all 128 codes of the American Standard Code for Information Interchange, from 0 to 127, with each code written in decimal, hexadecimal, octal and 7-bit binary, its HTML character reference, the character itself, and, for the 33 control codes, the standard abbreviation and name. For example, code 10 is 0x0A, octal 012, binary 0001010: the control code LF, Line Feed, which ends a line on Unix, Linux and macOS. Code 65 is 0x41, the capital letter A.

Use the filters to show only control codes, printable characters, letters, digits or punctuation, and press any column heading to sort by that column; press it again to reverse the order. Copy as text gives a table aligned with spaces for notes and code comments, Copy as CSV gives a header row and one row per code for a spreadsheet, and Download .csv saves the same file. The table is built in your browser and nothing is sent anywhere.

How ASCII is organised

Control codes, 0 to 31 and 127

The first 32 codes and code 127 do not print a character. They were designed to control teleprinters and data links: BEL (7) rang a bell, BS (8) moved back one column, HT (9) jumped to the next tab stop, LF (10) fed the paper one line, CR (13) returned the print head to the start of the line, and ESC (27) introduced a command sequence. Today LF and CR mark line ends (Windows uses the pair CR LF), HT is the tab character, and ESC still starts the ANSI escape sequences that colour terminal output. DEL (127) is all seven bits set, because punching every hole in paper tape erased a character.

Printable characters, 32 to 126

Code 32 is the space. Then come punctuation and symbols, the digits 0 to 9 at 48 to 57, the capitals A to Z at 65 to 90 and the small letters a to z at 97 to 122, with more punctuation between and after the letter blocks. Small and capital letters differ by exactly 32, a single bit, which is why changing case in ASCII is a matter of flipping bit 5. The digits sit at 0x30 to 0x39, so the low four bits of a digit's code are its value.

Codes 128 to 255 are not ASCII

ASCII is a 7-bit code and ends at 127. Byte values from 128 to 255 mean different things in different encodings: Windows-1252, ISO-8859-1, the old DOS code page 437 and many others. Turn on Show Windows-1252 128 to 255 to see the most common of these, the Western European Windows code page, in a separate table. Its name column gives the Unicode code point each byte stands for, such as 0x80 for the euro sign € (U+20AC). In UTF-8 those byte values only ever occur inside multi-byte sequences, so a lone byte such as 0xE9 is not valid UTF-8 at all.

Reference table

The table below is the same data as the tool, rendered as a static page for printing or reading without JavaScript.

ASCII codes 0 to 127
DecimalHexOctalBinaryHTML entityCharacterAbbreviationName
0000000000000&#0;NULNull
1010010000001&#1;SOHStart of Heading
2020020000010&#2;STXStart of Text
3030030000011&#3;ETXEnd of Text
4040040000100&#4;EOTEnd of Transmission
5050050000101&#5;ENQEnquiry
6060060000110&#6;ACKAcknowledge
7070070000111&#7;BELBell
8080100001000&#8;BSBackspace
9090110001001&#9;HTHorizontal Tab
100A0120001010&#10;LFLine Feed
110B0130001011&#11;VTVertical Tab
120C0140001100&#12;FFForm Feed
130D0150001101&#13;CRCarriage Return
140E0160001110&#14;SOShift Out
150F0170001111&#15;SIShift In
16100200010000&#16;DLEData Link Escape
17110210010001&#17;DC1Device Control 1 (XON)
18120220010010&#18;DC2Device Control 2
19130230010011&#19;DC3Device Control 3 (XOFF)
20140240010100&#20;DC4Device Control 4
21150250010101&#21;NAKNegative Acknowledge
22160260010110&#22;SYNSynchronous Idle
23170270010111&#23;ETBEnd of Transmission Block
24180300011000&#24;CANCancel
25190310011001&#25;EMEnd of Medium
261A0320011010&#26;SUBSubstitute
271B0330011011&#27;ESCEscape
281C0340011100&#28;FSFile Separator
291D0350011101&#29;GSGroup Separator
301E0360011110&#30;RSRecord Separator
311F0370011111&#31;USUnit Separator
32200400100000&#32;SPSpace
33210410100001&#33;!Exclamation mark
34220420100010&quot;"Quotation mark
35230430100011&#35;#Number sign
36240440100100&#36;$Dollar sign
37250450100101&#37;%Percent sign
38260460100110&amp;&Ampersand
39270470100111&apos;'Apostrophe
40280500101000&#40;(Left parenthesis
41290510101001&#41;)Right parenthesis
422A0520101010&#42;*Asterisk
432B0530101011&#43;+Plus sign
442C0540101100&#44;,Comma
452D0550101101&#45;-Hyphen-minus
462E0560101110&#46;.Full stop
472F0570101111&#47;/Solidus (slash)
48300600110000&#48;0Digit zero
49310610110001&#49;1Digit one
50320620110010&#50;2Digit two
51330630110011&#51;3Digit three
52340640110100&#52;4Digit four
53350650110101&#53;5Digit five
54360660110110&#54;6Digit six
55370670110111&#55;7Digit seven
56380700111000&#56;8Digit eight
57390710111001&#57;9Digit nine
583A0720111010&#58;:Colon
593B0730111011&#59;;Semicolon
603C0740111100&lt;<Less-than sign
613D0750111101&#61;=Equals sign
623E0760111110&gt;>Greater-than sign
633F0770111111&#63;?Question mark
64401001000000&#64;@Commercial at
65411011000001&#65;ALatin capital letter A
66421021000010&#66;BLatin capital letter B
67431031000011&#67;CLatin capital letter C
68441041000100&#68;DLatin capital letter D
69451051000101&#69;ELatin capital letter E
70461061000110&#70;FLatin capital letter F
71471071000111&#71;GLatin capital letter G
72481101001000&#72;HLatin capital letter H
73491111001001&#73;ILatin capital letter I
744A1121001010&#74;JLatin capital letter J
754B1131001011&#75;KLatin capital letter K
764C1141001100&#76;LLatin capital letter L
774D1151001101&#77;MLatin capital letter M
784E1161001110&#78;NLatin capital letter N
794F1171001111&#79;OLatin capital letter O
80501201010000&#80;PLatin capital letter P
81511211010001&#81;QLatin capital letter Q
82521221010010&#82;RLatin capital letter R
83531231010011&#83;SLatin capital letter S
84541241010100&#84;TLatin capital letter T
85551251010101&#85;ULatin capital letter U
86561261010110&#86;VLatin capital letter V
87571271010111&#87;WLatin capital letter W
88581301011000&#88;XLatin capital letter X
89591311011001&#89;YLatin capital letter Y
905A1321011010&#90;ZLatin capital letter Z
915B1331011011&#91;[Left square bracket
925C1341011100&#92;\Reverse solidus (backslash)
935D1351011101&#93;]Right square bracket
945E1361011110&#94;^Circumflex accent
955F1371011111&#95;_Low line (underscore)
96601401100000&#96;`Grave accent (backtick)
97611411100001&#97;aLatin small letter a
98621421100010&#98;bLatin small letter b
99631431100011&#99;cLatin small letter c
100641441100100&#100;dLatin small letter d
101651451100101&#101;eLatin small letter e
102661461100110&#102;fLatin small letter f
103671471100111&#103;gLatin small letter g
104681501101000&#104;hLatin small letter h
105691511101001&#105;iLatin small letter i
1066A1521101010&#106;jLatin small letter j
1076B1531101011&#107;kLatin small letter k
1086C1541101100&#108;lLatin small letter l
1096D1551101101&#109;mLatin small letter m
1106E1561101110&#110;nLatin small letter n
1116F1571101111&#111;oLatin small letter o
112701601110000&#112;pLatin small letter p
113711611110001&#113;qLatin small letter q
114721621110010&#114;rLatin small letter r
115731631110011&#115;sLatin small letter s
116741641110100&#116;tLatin small letter t
117751651110101&#117;uLatin small letter u
118761661110110&#118;vLatin small letter v
119771671110111&#119;wLatin small letter w
120781701111000&#120;xLatin small letter x
121791711111001&#121;yLatin small letter y
1227A1721111010&#122;zLatin small letter z
1237B1731111011&#123;{Left curly bracket
1247C1741111100&#124;|Vertical line
1257D1751111101&#125;}Right curly bracket
1267E1761111110&#126;~Tilde
1277F1771111111&#127;DELDelete

Related tools

To turn text into these codes, or codes back into text, in binary, octal, decimal or hex, use Text to Binary. For HTML character references beyond the five named ones in ASCII, the HTML Entity Encoder and Decoder covers the full HTML5 list. Numbers in other bases can be converted with the Number Base Converter.

Open-source credits

The table is implemented in-house on this site. The codes, abbreviations and names follow ANSI X3.4-1986 (US-ASCII), also published as RFC 20 and ISO/IEC 646. The extended view follows the windows-1252 index of the WHATWG Encoding Standard, and the HTML references follow the WHATWG HTML standard.

Frequently asked questions

Why does ASCII have only 128 codes?

ASCII was standardised in the 1960s as a 7-bit code, and seven bits give exactly 128 values, from 0 to 127. The eighth bit of a byte was left for parity checking on noisy lines. Codes from 128 to 255 belong to later 8-bit encodings such as Windows-1252, not to ASCII.

What is the difference between LF and CR?

LF (Line Feed, code 10) moved a teleprinter's paper up one line and CR (Carriage Return, code 13) moved the print head back to the left margin. Unix, Linux and macOS end lines with LF alone, Windows uses CR followed by LF, and classic Mac OS used CR alone.

Why do capital and small letters differ by 32?

The designers placed the two alphabets exactly 32 codes apart so that they differ in a single bit, bit 5. Hardware and software could change case by setting or clearing that one bit: A is 65 (0x41) and a is 97 (0x61).

Is code 127 a printable character?

No. Code 127 is DEL, Delete, a control code with all seven bits set. On paper tape a mistyped character was erased by punching every hole over it, so the all-ones pattern came to mean 'ignore this character'. It prints nothing in most programs today.

Which characters have named HTML entities in ASCII?

Five do: the quotation mark (&quot;), the ampersand (&amp;), the apostrophe (&apos;), the less-than sign (&lt;) and the greater-than sign (&gt;). Every other ASCII character can be written as a numeric reference such as &#65; for A, which this table shows in its HTML entity column.

Other related tools