ASCII Table

All 128 ASCII codes with their decimal, hexadecimal, octal and binary values; type in the filter box to narrow the table.

DecimalHexOctalBinaryCharacter
0000000000000NUL
1010010000001SOH
2020020000010STX
3030030000011ETX
4040040000100EOT
5050050000101ENQ
6060060000110ACK
7070070000111BEL
8080100001000BS
9090110001001HT
100A0120001010LF
110B0130001011VT
120C0140001100FF
130D0150001101CR
140E0160001110SO
150F0170001111SI
16100200010000DLE
17110210010001DC1
18120220010010DC2
19130230010011DC3
20140240010100DC4
21150250010101NAK
22160260010110SYN
23170270010111ETB
24180300011000CAN
25190310011001EM
261A0320011010SUB
271B0330011011ESC
281C0340011100FS
291D0350011101GS
301E0360011110RS
311F0370011111US
32200400100000(space)
33210410100001!
34220420100010"
35230430100011#
36240440100100$
37250450100101%
38260460100110&
39270470100111'
40280500101000(
41290510101001)
422A0520101010*
432B0530101011+
442C0540101100,
452D0550101101-
462E0560101110.
472F0570101111/
483006001100000
493106101100011
503206201100102
513306301100113
523406401101004
533506501101015
543606601101106
553706701101117
563807001110008
573907101110019
583A0720111010:
593B0730111011;
603C0740111100<
613D0750111101=
623E0760111110>
633F0770111111?
64401001000000@
65411011000001A
66421021000010B
67431031000011C
68441041000100D
69451051000101E
70461061000110F
71471071000111G
72481101001000H
73491111001001I
744A1121001010J
754B1131001011K
764C1141001100L
774D1151001101M
784E1161001110N
794F1171001111O
80501201010000P
81511211010001Q
82521221010010R
83531231010011S
84541241010100T
85551251010101U
86561261010110V
87571271010111W
88581301011000X
89591311011001Y
905A1321011010Z
915B1331011011[
925C1341011100\
935D1351011101]
945E1361011110^
955F1371011111_
96601401100000`
97611411100001a
98621421100010b
99631431100011c
100641441100100d
101651451100101e
102661461100110f
103671471100111g
104681501101000h
105691511101001i
1066A1521101010j
1076B1531101011k
1086C1541101100l
1096D1551101101m
1106E1561101110n
1116F1571101111o
112701601110000p
113711611110001q
114721621110010r
115731631110011s
116741641110100t
117751651110101u
118761661110110v
119771671110111w
120781701111000x
121791711111001y
1227A1721111010z
1237B1731111011{
1247C1741111100|
1257D1751111101}
1267E1761111110~
1277F1771111111DEL

How to use

  1. Scroll the table, or type a character, a code or a name such as LF into Filter the table….
  2. Read across the row for the decimal, hex, octal and binary value of that character.

About this tool

What ASCII covers

ASCII (American Standard Code for Information Interchange, first published in 1963) is a 7-bit code, so it has exactly 128 values, 0 to 127. They fall into three groups:

  • 0–31 and 127: control characters. These don't print anything; they were commands for teleprinters and terminals. The ones still in daily use are HT (9, tab), LF (10, line feed), CR (13, carriage return) and ESC (27), which starts terminal color and cursor sequences.
  • 32: space.
  • 33–126: printable characters: punctuation, digits, and uppercase and lowercase letters.

Patterns worth knowing

The layout follows a plan, and a few patterns make codes easy to work out:

  • Digits start at 48 (0x30), so a digit's code minus 48 is its value: '7' is 55.
  • Uppercase letters start at 65 (0x41) and lowercase at 97 (0x61). The difference is exactly 32, a single bit (0x20), which is why switching case in ASCII is one bit flip.
  • Control characters map to letters with Ctrl: Ctrl+C sends 3 (ETX), Ctrl+I is the same as Tab (9), and Ctrl+[ is ESC (27).

Line endings: CR, LF and CRLF

Unix, Linux and macOS end lines with LF (10). Windows uses CR followed by LF (13, 10). Mixed line endings are a frequent cause of noisy diffs in version control and of ^M showing up in editors.

ASCII, extended ASCII and UTF-8

Values 128–255 are not ASCII. So-called extended ASCII tables differ between code pages, such as Windows-1252, ISO 8859-1 and the old PC code page 437, so the same byte can mean different characters. UTF-8 was designed so the first 128 code points are encoded exactly as in ASCII, one byte each, which is why plain ASCII text is also valid UTF-8.

Frequently asked questions

How many characters are in ASCII?

128, numbered 0 to 127. 33 of them are control characters (0–31 and 127) and 95 are printable, counting the space.

What is the ASCII code for A?

Uppercase A is 65 in decimal (0x41 in hex). Lowercase a is 97 (0x61).

What is the difference between CR and LF?

LF (line feed, 10) moves to the next line and CR (carriage return, 13) moves to the start of the line. Unix and macOS end lines with LF; Windows uses CR followed by LF.

Is ASCII the same as UTF-8?

UTF-8 encodes the first 128 characters exactly like ASCII, one byte each, so ASCII text is valid UTF-8. UTF-8 then adds multi-byte sequences for every other Unicode character.