ASCII Table

All 128 ASCII characters with their codes in decimal, hexadecimal, octal and 7-bit binary, the full name of each character, the control codes with caret notation (^C, ^[) and the HTML entity and string escape you would type in code. Search by character, by code (65 or 0x41) or by name.

Show
DecHexOctBinaryCharNameHTMLEscape
0000000000000NULNull^@�\0
1010010000001SOHStart of heading^A\x01
2020020000010STXStart of text^B\x02
3030030000011ETXEnd of text (Ctrl+C)^C\x03
4040040000100EOTEnd of transmission (Ctrl+D)^D\x04
5050050000101ENQEnquiry^E\x05
6060060000110ACKAcknowledge^F\x06
7070070000111BELBell^G\a
8080100001000BSBackspace^H\b
9090110001001HTHorizontal tab^I	\t
100A0120001010LFLine feed (new line)^J
\n
110B0130001011VTVertical tab^K\v
120C0140001100FFForm feed^L\f
130D0150001101CRCarriage return^M
\r
140E0160001110SOShift out^N\x0e
150F0170001111SIShift in^O\x0f
16100200010000DLEData link escape^P\x10
17110210010001DC1Device control 1 (XON)^Q\x11
18120220010010DC2Device control 2^R\x12
19130230010011DC3Device control 3 (XOFF)^S\x13
20140240010100DC4Device control 4^T\x14
21150250010101NAKNegative acknowledge^U\x15
22160260010110SYNSynchronous idle^V\x16
23170270010111ETBEnd of transmission block^W\x17
24180300011000CANCancel^X\x18
25190310011001EMEnd of medium^Y\x19
261A0320011010SUBSubstitute (Ctrl+Z)^Z\x1a
271B0330011011ESCEscape^[\x1b
281C0340011100FSFile separator^\\x1c
291D0350011101GSGroup separator^]\x1d
301E0360011110RSRecord separator^^\x1e
311F0370011111USUnit separator^_\x1f
32200400100000SPSpace 
33210410100001!Exclamation mark!
34220420100010"Double quote" "\"
35230430100011#Hash#
36240440100100$Dollar sign$
37250450100101%Percent sign%
38260460100110&Ampersand& &
39270470100111'Single quote (apostrophe)' '\'
40280500101000(Opening parenthesis(
41290510101001)Closing parenthesis)
422A0520101010*Asterisk*
432B0530101011+Plus sign+
442C0540101100,Comma,
452D0550101101-Hyphen-minus-
462E0560101110.Full stop (period).
472F0570101111/Slash/
483006001100000Digit 00
493106101100011Digit 11
503206201100102Digit 22
513306301100113Digit 33
523406401101004Digit 44
533506501101015Digit 55
543606601101106Digit 66
553706701101117Digit 77
563807001110008Digit 88
573907101110019Digit 99
583A0720111010:Colon:
593B0730111011;Semicolon&#59;
603C0740111100<Less-than sign&#60; &lt;
613D0750111101=Equals sign&#61;
623E0760111110>Greater-than sign&#62; &gt;
633F0770111111?Question mark&#63;
64401001000000@At sign&#64;
65411011000001ACapital letter A&#65;
66421021000010BCapital letter B&#66;
67431031000011CCapital letter C&#67;
68441041000100DCapital letter D&#68;
69451051000101ECapital letter E&#69;
70461061000110FCapital letter F&#70;
71471071000111GCapital letter G&#71;
72481101001000HCapital letter H&#72;
73491111001001ICapital letter I&#73;
744A1121001010JCapital letter J&#74;
754B1131001011KCapital letter K&#75;
764C1141001100LCapital letter L&#76;
774D1151001101MCapital letter M&#77;
784E1161001110NCapital letter N&#78;
794F1171001111OCapital letter O&#79;
80501201010000PCapital letter P&#80;
81511211010001QCapital letter Q&#81;
82521221010010RCapital letter R&#82;
83531231010011SCapital letter S&#83;
84541241010100TCapital letter T&#84;
85551251010101UCapital letter U&#85;
86561261010110VCapital letter V&#86;
87571271010111WCapital letter W&#87;
88581301011000XCapital letter X&#88;
89591311011001YCapital letter Y&#89;
905A1321011010ZCapital letter Z&#90;
915B1331011011[Opening square bracket&#91;
925C1341011100\Backslash&#92;\\
935D1351011101]Closing square bracket&#93;
945E1361011110^Caret&#94;
955F1371011111_Underscore&#95;
96601401100000`Backtick (grave accent)&#96;
97611411100001aSmall letter a&#97;
98621421100010bSmall letter b&#98;
99631431100011cSmall letter c&#99;
100641441100100dSmall letter d&#100;
101651451100101eSmall letter e&#101;
102661461100110fSmall letter f&#102;
103671471100111gSmall letter g&#103;
104681501101000hSmall letter h&#104;
105691511101001iSmall letter i&#105;
1066A1521101010jSmall letter j&#106;
1076B1531101011kSmall letter k&#107;
1086C1541101100lSmall letter l&#108;
1096D1551101101mSmall letter m&#109;
1106E1561101110nSmall letter n&#110;
1116F1571101111oSmall letter o&#111;
112701601110000pSmall letter p&#112;
113711611110001qSmall letter q&#113;
114721621110010rSmall letter r&#114;
115731631110011sSmall letter s&#115;
116741641110100tSmall letter t&#116;
117751651110101uSmall letter u&#117;
118761661110110vSmall letter v&#118;
119771671110111wSmall letter w&#119;
120781701111000xSmall letter x&#120;
121791711111001ySmall letter y&#121;
1227A1721111010zSmall letter z&#122;
1237B1731111011{Opening curly brace&#123;
1247C1741111100|Vertical bar (pipe)&#124;
1257D1751111101}Closing curly brace&#125;
1267E1761111110~Tilde&#126;
1277F1771111111DELDelete^?&#127;\x7f

Features

  • Codes 0 to 127 in decimal, hex, octal and binary

  • Names for all 33 control characters, such as LF (line feed) and ESC

  • Caret notation used by terminals, such as ^C for ETX and ^? for DEL

  • HTML numeric entities, plus named ones like &amp; and &lt;

  • C and JavaScript escapes: \n, \t, \r, \0, \x1b

  • Filter to letters, digits, symbols, printable or control characters

When you reach for an ASCII table

Programming assignments

Find the code of 'A' (65) or 'a' (97) for character arithmetic in C, Java or Python.

Debugging files and protocols

Spot a stray CR (13) before LF (10), a tab (9) in a CSV, or a NUL byte in a hex dump.

Escaping characters

Get the HTML entity or string escape for quotes, ampersands and backslashes.

How ASCII is laid out

Four blocks of 32

  • 0 to 31: control characters (plus DEL at 127). Most are left over from teleprinters; LF, CR, HT and ESC are still used every day.
  • 32 to 63: space, punctuation and the digits 0 to 9 (48 to 57).
  • 64 to 95: @, capital letters A to Z (65 to 90) and [ \ ] ^ _.
  • 96 to 127: backtick, small letters a to z (97 to 122), { | } ~ and DEL.

Useful patterns

A capital letter and its small letter differ by 32, a single bit (0x20), which is why toggling that bit changes case. A digit's value is its code minus 48. Control keys follow the same rule: Ctrl plus a letter sends that letter's code minus 64, so Ctrl+C is 3 and Ctrl+[ is 27 (ESC).

ASCII and Unicode

ASCII covers only these 128 characters. Unicode keeps them at the same positions, and UTF-8 stores them as the same single bytes, so plain ASCII text is already valid UTF-8. Characters such as ₹ or Hindi letters are outside ASCII and take two to four bytes in UTF-8.

ASCII Table - FAQ