Skip to content
ToolBoxGeniehome

ASCII Table

Developer Tools · Added

All 128 ASCII characters with their decimal, hexadecimal, octal and binary values — and, for the thirty-three control codes, what they were originally for and which escape sequence writes them. Search by character, by name, by number in any base, or by what a code does: typing "tab", "0x09" or "9" all find the same row. The table stops at 127 on purpose, because that is where ASCII stops.

Search by character, name, decimal, hex or description. A single character finds itself.

Show

128 of 128 characters

Control codes (0–31, 127)

CharDecHexOctBinaryName
NUL00000000000000NUL^@Null. Terminates a string in C, and pads elsewhere.
SOH10100100000001SOH^AStart of heading.
STX20200200000010STX^BStart of text.
ETX30300300000011ETX^CEnd of text. What Ctrl+C sends to interrupt a program.
EOT40400400000100EOT^DEnd of transmission. Ctrl+D, which closes standard input.
ENQ50500500000101ENQ^EEnquiry — asks the far end to identify itself.
ACK60600600000110ACK^FAcknowledge.
BEL70700700000111BEL\a^GBell. Still rings the terminal, or flashes it.
BS80801000001000BS\b^HBackspace — moves the cursor back one column.
HT90901100001001HT\t^IHorizontal tab.
LF100A01200001010LF\n^JLine feed. The newline on Unix and in every network protocol.
VT110B01300001011VT\v^KVertical tab.
FF120C01400001100FF\f^LForm feed — ejects a page on a printer.
CR130D01500001101CR\r^MCarriage return. Paired with LF for Windows line endings.
SO140E01600001110SO^NShift out — switches to an alternate character set.
SI150F01700001111SI^OShift in — switches back.
DLE161002000010000DLE^PData link escape.
DC1171102100010001DC1^QDevice control 1, also XON — resumes a paused transmission. Ctrl+Q.
DC2181202200010010DC2^RDevice control 2.
DC3191302300010011DC3^SDevice control 3, also XOFF — pauses transmission. Ctrl+S.
DC4201402400010100DC4^TDevice control 4.
NAK211502500010101NAK^UNegative acknowledge.
SYN221602600010110SYN^VSynchronous idle — keeps a link in step when nothing is being sent.
ETB231702700010111ETB^WEnd of transmission block.
CAN241803000011000CAN^XCancel.
EM251903100011001EM^YEnd of medium.
SUB261A03200011010SUB^ZSubstitute. Used as end-of-file in DOS text files.
ESC271B03300011011ESC\e^[Escape. Introduces the ANSI sequences that colour and move a terminal cursor.
FS281C03400011100FS^\File separator.
GS291D03500011101GS^]Group separator.
RS301E03600011110RS^^Record separator.
US311F03700011111US^_Unit separator.
DEL1277F17701111111DEL^?Delete. On punched tape this punched every hole, obliterating whatever was there.

Space

CharDecHexOctBinaryName
SP322004000100000SpaceSpace. Printable, but the only one with no visible mark.

Punctuation and symbols

CharDecHexOctBinaryName
!332104100100001Exclamation markExclamation mark. Safe in a URL path, reserved in some shells.
"342204200100010Quotation markDouble quote. Escaped as " in HTML and \" in most languages.
#352304300100011Number signNumber sign. Starts the fragment in a URL, so it must be encoded as %23 elsewhere.
$362404400100100Dollar signDollar sign. Introduces variable expansion in shells and template literals.
%372504500100101Percent signPercent sign. Introduces a percent-encoding in a URL, so a literal one is %25.
&382604600100110AmpersandAmpersand. Separates query parameters, and is & in HTML.
'392704700100111ApostropheApostrophe. Escaped as ' in HTML attributes.
(402805000101000Left parenthesis
)412905100101001Right parenthesis
*422A05200101010AsteriskAsterisk. The wildcard in globs and in most search syntaxes.
+432B05300101011Plus signPlus. Means a space in a query string, so a literal plus is %2B.
,442C05400101100Comma
-452D05500101101Hyphen-minus
.462E05600101110Full stop
/472F05700101111SolidusSolidus. The path separator in URLs and on Unix.
:583A07200111010Colon
;593B07300111011Semicolon
<603C07400111100Less-than signLess-than. Must be &lt; in HTML or it starts a tag.
=613D07500111101Equals sign
>623E07600111110Greater-than signGreater-than. Escaped as &gt; for symmetry, though it is only strictly required inside a tag.
?633F07700111111Question markQuestion mark. Starts the query string in a URL.
@644010001000000Commercial atCommercial at. Separates user from host in an email address.
[915B13301011011Left square bracket
\925C13401011100Reverse solidusReverse solidus. The escape character in almost every language, and the path separator on Windows.
]935D13501011101Right square bracket
^945E13601011110Circumflex accentCircumflex. Anchors the start of a line in a regular expression.
_955F13701011111Low line
`966014001100000Grave accentGrave accent. Opens a template literal in JavaScript and a command substitution in shells.
{1237B17301111011Left curly bracketLeft brace. Opens a block, an object, or an interpolation.
|1247C17401111100Vertical lineVertical line. The pipe in shells, and alternation in a regular expression.
}1257D17501111101Right curly bracket
~1267E17601111110TildeTilde. Home directory in a shell; unreserved in a URL since RFC 3986.

Digits (48–57)

CharDecHexOctBinaryName
0483006000110000Digit 0
1493106100110001Digit 1
2503206200110010Digit 2
3513306300110011Digit 3
4523406400110100Digit 4
5533506500110101Digit 5
6543606600110110Digit 6
7553706700110111Digit 7
8563807000111000Digit 8
9573907100111001Digit 9

Uppercase letters (65–90)

CharDecHexOctBinaryName
A654110101000001Latin capital letter A
B664210201000010Latin capital letter B
C674310301000011Latin capital letter C
D684410401000100Latin capital letter D
E694510501000101Latin capital letter E
F704610601000110Latin capital letter F
G714710701000111Latin capital letter G
H724811001001000Latin capital letter H
I734911101001001Latin capital letter I
J744A11201001010Latin capital letter J
K754B11301001011Latin capital letter K
L764C11401001100Latin capital letter L
M774D11501001101Latin capital letter M
N784E11601001110Latin capital letter N
O794F11701001111Latin capital letter O
P805012001010000Latin capital letter P
Q815112101010001Latin capital letter Q
R825212201010010Latin capital letter R
S835312301010011Latin capital letter S
T845412401010100Latin capital letter T
U855512501010101Latin capital letter U
V865612601010110Latin capital letter V
W875712701010111Latin capital letter W
X885813001011000Latin capital letter X
Y895913101011001Latin capital letter Y
Z905A13201011010Latin capital letter Z

Lowercase letters (97–122)

CharDecHexOctBinaryName
a976114101100001Latin small letter A
b986214201100010Latin small letter B
c996314301100011Latin small letter C
d1006414401100100Latin small letter D
e1016514501100101Latin small letter E
f1026614601100110Latin small letter F
g1036714701100111Latin small letter G
h1046815001101000Latin small letter H
i1056915101101001Latin small letter I
j1066A15201101010Latin small letter J
k1076B15301101011Latin small letter K
l1086C15401101100Latin small letter L
m1096D15501101101Latin small letter M
n1106E15601101110Latin small letter N
o1116F15701101111Latin small letter O
p1127016001110000Latin small letter P
q1137116101110001Latin small letter Q
r1147216201110010Latin small letter R
s1157316301110011Latin small letter S
t1167416401110100Latin small letter T
u1177516501110101Latin small letter U
v1187616601110110Latin small letter V
w1197716701110111Latin small letter W
x1207817001111000Latin small letter X
y1217917101111001Latin small letter Y
z1227A17201111010Latin small letter Z

ASCII is seven bits, so it ends at 127. Anything from 128 to 255 belongs to some other encoding — Latin-1, Windows-1252, or a continuation byte in a UTF-8 sequence — and treating those as “extended ASCII” is where mojibake comes from, because there is no single agreed set. The first 128 UTF-8 code units are identical to these by design, which is why plain ASCII text is valid UTF-8 without conversion.

How to use the ascii table

  1. 1Type in the search box to filter: a character finds itself, a name such as "escape" finds that code, and a number finds it in decimal or hex.
  2. 2Use the filter to show only printable characters or only control codes.
  3. 3Read across for the decimal, hex, octal and binary value of any character.
  4. 4Control codes show their escape sequence where one exists, and the Ctrl combination that produces them on a terminal.
  5. 5Copy the whole filtered table as tab-separated values if you need it elsewhere.

Examples

Finding a character's code

Input
A
Result
65 decimal, 0x41, 0o101, 01000001

The uppercase letters start at 65 and the lowercase at 97, exactly 32 apart — which is one bit.

Looking up a control code

Input
tab
Result
9 — Horizontal tab, escape sequence \t, Ctrl+I

Every control code from 1 to 26 corresponds to Ctrl plus a letter, in alphabetical order.

Going the other way

Input
0x0A
Result
Line feed — the newline on Unix and in every network protocol

Windows uses 0x0D followed by 0x0A, which is why text files moved between the two grow or lose characters.

About the ascii table

A code designed around the hardware of 1963

ASCII was standardised in 1963 for teleprinters, and its structure reflects that. The control codes at the start are commands to a machine rather than characters on a page: ring the bell, feed the paper, return the carriage, stop transmitting. The printable characters follow, arranged so that useful operations were cheap in hardware — digits in a contiguous block starting at 0x30, letters contiguous and case-separated by one bit, and the whole set fitting into seven bits so the eighth could be used for parity on a noisy line.

Seven bits was not an accident either. Punched paper tape and early serial links were error-prone, and reserving the eighth bit for a parity check caught single-bit errors in transmission. When links became reliable enough that parity was not worth the bandwidth, that eighth bit became available — and every country immediately used it for its own accented characters, which is how the mutually incompatible eight-bit encodings came about.

DEL at 127 is the clearest fossil in the set. On paper tape, deleting a character meant punching out every hole in that position, which produces all seven bits set — 127. It could not be undone, and it could not be mistaken for anything else, which is why the delete code is at the top of the table rather than next to the other control codes at the bottom.

Where ASCII assumptions still cause problems

The most common is assuming one byte equals one character. It is true in ASCII and false in UTF-8 for anything outside the first 128 code points, so code that counts bytes to count characters, or slices a string at a byte offset, will eventually cut a multi-byte sequence in half and produce a replacement character. This is why every modern language distinguishes byte length from character length, and why the distinction matters most in exactly the places people forget it: truncating a display name, validating a field length, or splitting a file into fixed-size chunks.

The second is case conversion. The one-bit trick works perfectly for A to Z and not at all for anything else. Turkish has a dotted and a dotless i that case-convert differently from English, German ß uppercases to two characters, and Greek sigma has a different lowercase form at the end of a word. Any code doing case-insensitive comparison with a bitmask is quietly wrong outside ASCII, which is why locale-aware case folding exists.

The third is validation. Rejecting input containing bytes above 127 was once a reasonable sanity check and is now a bug — it rejects most names in the world. The useful modern check is whether the input is well-formed UTF-8 and free of control characters, which is a different question entirely and one this table is genuinely useful for answering.

Frequently asked questions

Why does the table stop at 127?
Because ASCII is a seven-bit code and 127 is the largest number seven bits can hold. Codes from 128 to 255 are not ASCII at all — they belong to whichever eight-bit encoding is in use, and there are dozens: Latin-1, Windows-1252, KOI8-R, and so on, all disagreeing about what those values mean. There is no single "extended ASCII", and treating one as though it were universal is precisely how text turns into mojibake.
How does ASCII relate to Unicode and UTF-8?
The first 128 Unicode code points are identical to ASCII, and UTF-8 encodes each of them as a single byte with the same value. That was a deliberate design goal: it means any file containing only ASCII is already valid UTF-8, and software that only understands ASCII can read the ASCII parts of a UTF-8 file without choking. Anything above 127 in UTF-8 is a multi-byte sequence, with the high bits of the first byte saying how many follow.
What is the difference between CR and LF?
They come from mechanical typewriters, where they were two separate physical actions: carriage return moved the print head back to the left margin, and line feed advanced the paper by one line. Unix and the internet standardised on LF alone as a newline, classic Mac OS used CR, and Windows kept both as CRLF. That inheritance is why a text file moved between platforms shows either stray characters or no line breaks at all, and why every version control system has an opinion about it.
Are the control codes still used?
A handful are, constantly. Tab, line feed and carriage return are in every text file. Escape introduces the ANSI sequences that colour terminal output and move the cursor. NUL terminates strings in C. ETX is what Ctrl+C sends, EOT is Ctrl+D, and XON and XOFF still pause and resume serial links. The rest — the file and group separators, the device controls, the synchronous idle — were designed for paper tape and teleprinters and are essentially historical, though a few see occasional use as delimiters precisely because they never appear in ordinary text.
Why does the case of a letter differ by exactly 32?
Because it was designed to. Thirty-two is 2⁵, so uppercase and lowercase letters differ in exactly one bit — the sixth. That made case conversion a single bitwise operation on early hardware: OR with 0x20 to lowercase, AND with 0xDF to uppercase. The same arrangement puts the digits at 0x30 to 0x39, so the numeric value of a digit is its code with the top nibble masked off, which is why parsing a number by hand is a subtraction of 48.