ASCII Table

Complete ASCII character code reference. All 128 characters with decimal, hex, binary, octal, and HTML entity values.
All 128 Characters Searchable & Sortable Click to Copy

Printable Characters (32–126)

Printable ASCII characters with decimal, hexadecimal, binary, octal, HTML entity, and description values. Activate a character button to copy it.
HTML Description
32 20 00100000 040   Space
33 21 00100001 041 ! Exclamation mark
34 22 00100010 042 " Double quote
35 23 00100011 043 # Number sign
36 24 00100100 044 $ Dollar sign
37 25 00100101 045 % Percent sign
38 26 00100110 046 & Ampersand
39 27 00100111 047 ' Single quote
40 28 00101000 050 ( Left parenthesis
41 29 00101001 051 ) Right parenthesis
42 2A 00101010 052 * Asterisk
43 2B 00101011 053 + Plus sign
44 2C 00101100 054 , Comma
45 2D 00101101 055 - Hyphen-minus
46 2E 00101110 056 . Full stop
47 2F 00101111 057 / Slash
48 30 00110000 060 0 Digit 0
49 31 00110001 061 1 Digit 1
50 32 00110010 062 2 Digit 2
51 33 00110011 063 3 Digit 3
52 34 00110100 064 4 Digit 4
53 35 00110101 065 5 Digit 5
54 36 00110110 066 6 Digit 6
55 37 00110111 067 7 Digit 7
56 38 00111000 070 8 Digit 8
57 39 00111001 071 9 Digit 9
58 3A 00111010 072 : Colon
59 3B 00111011 073 &#59; Semicolon
60 3C 00111100 074 < Less-than sign
61 3D 00111101 075 = Equals sign
62 3E 00111110 076 > Greater-than sign
63 3F 00111111 077 ? Question mark
64 40 01000000 100 @ At sign
65 41 01000001 101 A Uppercase A
66 42 01000010 102 B Uppercase B
67 43 01000011 103 C Uppercase C
68 44 01000100 104 D Uppercase D
69 45 01000101 105 E Uppercase E
70 46 01000110 106 F Uppercase F
71 47 01000111 107 G Uppercase G
72 48 01001000 110 H Uppercase H
73 49 01001001 111 I Uppercase I
74 4A 01001010 112 J Uppercase J
75 4B 01001011 113 K Uppercase K
76 4C 01001100 114 L Uppercase L
77 4D 01001101 115 M Uppercase M
78 4E 01001110 116 N Uppercase N
79 4F 01001111 117 O Uppercase O
80 50 01010000 120 P Uppercase P
81 51 01010001 121 Q Uppercase Q
82 52 01010010 122 R Uppercase R
83 53 01010011 123 S Uppercase S
84 54 01010100 124 T Uppercase T
85 55 01010101 125 U Uppercase U
86 56 01010110 126 V Uppercase V
87 57 01010111 127 W Uppercase W
88 58 01011000 130 X Uppercase X
89 59 01011001 131 Y Uppercase Y
90 5A 01011010 132 Z Uppercase Z
91 5B 01011011 133 [ Left square bracket
92 5C 01011100 134 \ Backslash
93 5D 01011101 135 ] Right square bracket
94 5E 01011110 136 ^ Circumflex accent
95 5F 01011111 137 _ Low line
96 60 01100000 140 ` Grave accent
97 61 01100001 141 a Lowercase a
98 62 01100010 142 b Lowercase b
99 63 01100011 143 c Lowercase c
100 64 01100100 144 d Lowercase d
101 65 01100101 145 e Lowercase e
102 66 01100110 146 f Lowercase f
103 67 01100111 147 g Lowercase g
104 68 01101000 150 h Lowercase h
105 69 01101001 151 i Lowercase i
106 6A 01101010 152 j Lowercase j
107 6B 01101011 153 k Lowercase k
108 6C 01101100 154 l Lowercase l
109 6D 01101101 155 m Lowercase m
110 6E 01101110 156 n Lowercase n
111 6F 01101111 157 o Lowercase o
112 70 01110000 160 p Lowercase p
113 71 01110001 161 q Lowercase q
114 72 01110010 162 r Lowercase r
115 73 01110011 163 s Lowercase s
116 74 01110100 164 t Lowercase t
117 75 01110101 165 u Lowercase u
118 76 01110110 166 v Lowercase v
119 77 01110111 167 w Lowercase w
120 78 01111000 170 x Lowercase x
121 79 01111001 171 y Lowercase y
122 7A 01111010 172 z Lowercase z
123 7B 01111011 173 { Left curly bracket
124 7C 01111100 174 | Vertical line
125 7D 01111101 175 } Right curly bracket
126 7E 01111110 176 ~ Tilde

Control Characters (0–31, 127)
Symbol Caret notation Dec Hex Binary Oct Description
NUL ^@ 0 00 00000000 000 Null
SOH ^A 1 01 00000001 001 Start of heading
STX ^B 2 02 00000010 002 Start of text
ETX ^C 3 03 00000011 003 End of text
EOT ^D 4 04 00000100 004 End of transmission
ENQ ^E 5 05 00000101 005 Enquiry
ACK ^F 6 06 00000110 006 Acknowledge
BEL ^G 7 07 00000111 007 Bell
BS ^H 8 08 00001000 010 Backspace
HT ^I 9 09 00001001 011 Horizontal tab
LF ^J 10 0A 00001010 012 Line feed
VT ^K 11 0B 00001011 013 Vertical tab
FF ^L 12 0C 00001100 014 Form feed
CR ^M 13 0D 00001101 015 Carriage return
SO ^N 14 0E 00001110 016 Shift out
SI ^O 15 0F 00001111 017 Shift in
DLE ^P 16 10 00010000 020 Data link escape
DC1 ^Q 17 11 00010001 021 Device control 1 (XON)
DC2 ^R 18 12 00010010 022 Device control 2
DC3 ^S 19 13 00010011 023 Device control 3 (XOFF)
DC4 ^T 20 14 00010100 024 Device control 4
NAK ^U 21 15 00010101 025 Negative acknowledge
SYN ^V 22 16 00010110 026 Synchronous idle
ETB ^W 23 17 00010111 027 End of transmission block
CAN ^X 24 18 00011000 030 Cancel
EM ^Y 25 19 00011001 031 End of medium
SUB ^Z 26 1A 00011010 032 Substitute
ESC ^[ 27 1B 00011011 033 Escape
FS ^\ 28 1C 00011100 034 File separator
GS ^] 29 1D 00011101 035 Group separator
RS ^^ 30 1E 00011110 036 Record separator
US ^_ 31 1F 00011111 037 Unit separator
DEL ^? 127 7F 01111111 177 Delete

Caret notation writes codes 0–31 as ^@ through ^_; DEL is commonly shown as ^?. It is a display convention, not two literal bytes. DC1/^Q is also called XON, while DC3/^S is XOFF. Historically, DEL marked a deleted character by punching every hole in a paper-tape position.

Quick Reference

Letters A–Z

Uppercase: 65–90 (0x41–0x5A)

Lowercase: 97–122 (0x61–0x7A)

Difference: 32 (0x20)

Digits 0–9

Range: 48–57 (0x30–0x39)

Digit value = code - 48

Common Characters

Space: 32 (0x20)

Tab: 9 (0x09)

Newline: 10 (0x0A)

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard published in 1963. It maps 128 characters — English letters, digits, punctuation, and control codes — to numeric values 0 through 127. Its code-point assignments remain widely reused; UTF-8 preserves all 128 as the same single-byte values.

ASCII vs Unicode

ASCII covers 128 characters — sufficient for basic English text. Unicode 17.0 assigns 159,801 graphic and format characters across 172 scripts, including CJK characters, emoji, mathematical symbols, and historical scripts. UTF-8, the dominant Unicode encoding, is backward-compatible with ASCII: bytes 0–127 map to the same characters in both. This is why ASCII knowledge remains relevant — it is the common subset shared by the two encodings.

Control Characters in Current Systems

Most ASCII control codes came from teleprinters, but several still affect files, terminals, and protocols. NUL (00) terminates strings in C. HT (09) is a tab, while LF (0A) and CR (0D) form common line endings. Terminal escape sequences begin with ESC (1B).

Hidden controls can change parsing even when the text looks normal. Inspect the byte values when a CSV row splits in the wrong place, a shell prompt changes color unexpectedly, or a Windows text file shows extra line breaks on another system.

Extended ASCII Is Not One Table

Standard ASCII stops at 127. The name "extended ASCII" refers to several incompatible 8-bit encodings, including ISO-8859-1, Windows-1252, and IBM code page 437. They agree on codes 0–127 but assign different characters to some values from 128 through 255. A byte such as E9 therefore needs an encoding label before it can be interpreted correctly.

Use UTF-8 for new text formats unless a protocol specifies another encoding. The ASCII, UTF-8, and Unicode guide explains the distinction between character sets, code points, and byte encodings.

Look Up ASCII Values in Code

The same 0–127 mapping is available through standard language functions:

// JavaScript
'A'.charCodeAt(0);       // 65
String.fromCharCode(65); // "A"

# Python
ord('A')  # 65
chr(65)   # 'A'

// Java
(int) 'A';  // 65
(char) 65;  // 'A'

Checking Whether Text Is Pure ASCII

Validate the complete string before treating character positions as one-byte ASCII values:

// JavaScript
function isAscii(text) {
  return /^[\x00-\x7F]*$/.test(text);
}

isAscii('Hello World'); // true
isAscii('Café');        // false

# Python 3.7+
'Hello World'.isascii()  # True
'Café'.isascii()         # False

Check that every code point is at most 127 before labeling text as ASCII. For whole strings, the ASCII code converter handles one-character lookups, while the text to hex converter encodes complete text input.

For strict byte-pair parsing and complete implementations in Python, JavaScript, C, and shell, use the hex to ASCII programming guide and its ASCII to hex companion.

Inspecting Printable ASCII in Binary Data

Filtering bytes from 32 through 126 is a quick way to extract possible ASCII strings from a file. It is deliberately lossy: it removes offsets, controls, and every non-ASCII byte, so it must not be used to reconstruct the original data.

# Python: extract only printable ASCII bytes
with open('data.bin', 'rb') as file:
    data = file.read()
    printable = ''.join(chr(byte) for byte in data if 32 <= byte <= 126)
    print(printable)

Use the hex decoder when offsets, control bytes, UTF-8 validity, or file signatures matter; it can inspect a local file without uploading it.

Base64 Uses an ASCII Alphabet

Standard Base64 represents binary data with the ASCII characters A–Z, a–z, 0–9, +, and /, plus optional = padding. Every complete group of 3 input bytes (24 bits) becomes 4 Base64 characters (6 bits each), making the encoded form about 33% larger before padding. Base64 is an encoding, not encryption or integrity protection.

// Browser example for an ASCII-only string
btoa('Hello');      // 'SGVsbG8='
atob('SGVsbG8=');   // 'Hello'

Browser btoa() accepts a binary string whose code units fit in one byte; encode arbitrary Unicode text to bytes first. RFC 4648 defines standard Base64 and the separate base64url alphabet used by URL-safe formats.

Primary References

Related Tools

Use our ASCII Code Converter to look up individual characters and convert between decimal, hex, binary, and octal formats. To convert entire strings, try the Hex to ASCII converter or the Text to Hex converter.

Frequently Asked Questions

What is the ASCII table?
The ASCII table maps 128 characters to numeric codes (0–127). It includes 33 control codes (0–31 and 127), a printable space (32), and 94 graphic characters (33–126) covering English letters, digits, and punctuation. UTF-8 preserves these assignments as identical single-byte values.
How many characters are in the ASCII table?
ASCII is a 7-bit code, so it has 2^7 = 128 possible values. They comprise 33 control characters (codes 0–31 and 127), 1 space, 26 uppercase letters, 26 lowercase letters, 10 digits, and 32 punctuation or symbol characters. Early systems sometimes used an eighth bit for parity; later 8-bit encodings reused it for incompatible character extensions.
What is the difference between ASCII and Extended ASCII?
Standard ASCII uses 7 bits and defines 128 codes (0–127). "Extended ASCII" is an informal label for several incompatible 8-bit encodings, not one additional standard. Encodings such as Windows-1252 and ISO-8859-1 preserve the ASCII range but assign different meanings to some bytes from 128 through 255.
What are ASCII control characters?
Control characters (codes 0–31 and 127) are non-printable characters originally used to control hardware devices. Common examples: 0 (NUL/null), 9 (HT/tab), 10 (LF/line feed), 13 (CR/carriage return), 27 (ESC/escape), 127 (DEL/delete). Most are rarely used today except for tab, line feed, and carriage return.
How is ASCII related to UTF-8?
UTF-8 is backward-compatible with ASCII: the first 128 characters (codes 0–127) are identical in both encodings. Any valid ASCII text is also valid UTF-8. UTF-8 extends beyond ASCII with multi-byte sequences and can represent the Unicode code-point range.