ASCII (Standard)

A table of seven-bit binary numbers that encode the alphabet and other symbols.

ASCII stands for American Standard Code for Information Interchange. It describes an encoding for letters, numbers and punctuation symbols that can be realized in seven bits. It uses only seven of the 8 bits for historical reasons to allow the eighth bit to be used for parity control when the characters are transmitted through serial interfaces.

Many of the character codes are reserved to send control signals to terminals and to manage the communications. Modern networking provides this capability outside of the character encoding.

There is an extended ASCII encoding that provides all 8 bits for character code mapping. This defines the upper 127 characters in addition to the lower 127 characters in the 7-bit representation.

There are many alternative interpretations of the ASCII character set that allow for national extensions to the character set. In some cases, this may only result in the replacement of a few currency symbols.

JavaScript uses the Unicode character set. The lower 127 characters of Unicode are purposely mapped to the ASCII character. ASCII is described here to provide help when you are exchanging data files with ASCII based systems or applications.

It may also be useful in some situations if you are using JavaScript to drive a serial interface to control some external system. Whether you could do that would depend on the hosting environment. A browser wouldn't give you those capabilities, but an embedded JavaScript interpreter in a process control system may well allow you to do that sort of thing.

This table summarizes the lower 127 characters in the ASCII character set.

DecHexSymUnicodeDescription
00000NUL\u0000<ctrl-@> Null character
00101SOH\u0001<ctrl-A> Start of header
00202STX\u0002<ctrl-B> Start of text
00303ETX\u0003<ctrl-C> End of text
00404EOT\u0004<ctrl-D> End of transmission
00505ENQ\u0005<ctrl-E> Enquiry
00606ACK\u0006<ctrl-F> Positive acknowledge
00707BEL\u0007<ctrl-G> Alert (bell)
00808BS\u0008<ctrl-H> Backspace
00909HT\u0009<ctrl-I> Horizontal tab
0100ALF\u000A<ctrl-J> Line feed
0110BVT\u000B<ctrl-K> Vertical tab
0120CFF\u000C<ctrl-L> Form feed
0130DCR\u000D<ctrl-M> Carriage return
0140ESO\u000E<ctrl-N> Shift out
0150FSI\u000F<ctrl-O> Shift in
01610DLE\u0010<ctrl-P> Data link escape
01711DC1\u0011<ctrl-Q> Device control 1 (XON)
01812DC2\u0012<ctrl-R> Device control 2 (tape on)
01913DC3\u0013<ctrl-S> Device control 3 (XOFF)
02014DC4\u0014<ctrl-T> Device control 4 (tape off)
02115NAK\u0015<ctrl-U> Negative acknowledgement
02216SYN\u0016<ctrl-V> Synchronous idle
02317ETB\u0017<ctrl-W> End of transmission block
02418CAN\u0018<ctrl-X> Cancel
02519EM\u0019<ctrl-Y> End of medium
0261ASUB\u001A<ctrl-Z> Substitute
0271BESC\u001B<ctrl-[> Escape
0281CFS\u001C<ctrl-\> File separator (Form separator)
0291DGS\u001D<ctrl-]> Group separator
0301ERS\u001E<ctrl-^> Record separator
0311FUS\u001F<ctrl-_> Unit separator
03220SP\u0020Space
03321!\u0021Exclamation point (bang)
03422"\u0022Double quote
03523#\u0023Hash (number sign, pound sign, sharp)
03624$\u0024Dollar sign (buck)
03725%\u0025Percent sign
03826&\u0026Ampersand
03927'\u0027Apostrophe (single quote)
04028(\u0028Left parenthesis
04129)\u0029Right parenthesis
0422A*\u002AAstrisk (star)
0432B+\u002BPlus sign
0442C,\u002CComma
0452D-\u002DMinus sign (hyphen)
0462E.\u002EPeriod (full stop, dot, point)
0472F/\u002FSlash (virgule, solidus)
048300\u0030-
049311\u0031-
050322\u0032-
051333\u0033-
052344\u0034-
053355\u0035-
054366\u0036-
055377\u0037-
056388\u0038-
057399\u0039-
0583A:\u003AColon
0593B;\u003BSemi-colon
0603C<\u003CLeft caret (less than, left angle bracket)
0613D=\u003DEqual sign
0623E>\u003ERight caret (greater than, right angle bracket)
0633F?\u003FQuestion mark
06440@\u0040Commercial at sign
06541A\u0041-
06642B\u0042-
06743C\u0043-
06844D\u0044-
06945E\u0045-
07046F\u0046-
07147G\u0047-
07248H\u0048-
07349I\u0049-
0744AJ\u004A-
0754BK\u004B-
0764CL\u004C-
0774DM\u004D-
0784EN\u004E-
0794FO\u004F-
08050P\u0050-
08151Q\u0051-
08252R\u0052-
08353S\u0053-
08454T\u0054-
08555U\u0055-
08656V\u0056-
08757W\u0057-
08858X\u0058-
08959Y\u0059-
0905AZ\u005A-
0915B[\u005BLeft square bracket
0925C\\u005CBackslash (reverse solidus)
0935D]\u005DRight square bracket
0945E^\u005ECircumflex accent
0955F_\u005FUnderscore (low line)
09660`\u0060Grave accent (back quote, back tick)
09761a\u0061-
09862b\u0062-
09963c\u0063-
10064d\u0064-
10165e\u0065-
10266f\u0066-
10367g\u0067-
10468h\u0068-
10569i\u0069-
1066Aj\u006A-
1076Bk\u006B-
1086Cl\u006C-
1096Dm\u006D-
1106En\u006E-
1116Fo\u006F-
11270p\u0070-
11371q\u0071-
11472r\u0072-
11573s\u0073-
11674t\u0074-
11775u\u0075-
11876v\u0076-
11977w\u0077-
12078x\u0078-
12179y\u0079-
1227Az\u007A-
1237B{\u007BLeft brace (left curly bracket)
1247C|\u007CVerical line (bar, pipe)
1257D}\u007DRight brace (right curly bracket)
1267E~\u007ETilde
1277FDEL\u007FDelete

See also:Character set, Character-case mapping, Control character, Equal to (==), Greater than (>), Greater than or equal to (>=), Identically equal to (===), isLower(), isUpper(), Less than (<), Less than or equal to (<=), NOT Equal to (!=), NOT Identically equal to (!==)