ASCII Table (Dec, Hex, Octal, Binary)

A complete, searchable ASCII reference for codes 0–127, showing the decimal, hexadecimal, octal, and binary value of every character plus control-code names.

Type a character, a decimal code (65), hex (0x41), octal (0o101), binary (01000001 or 0b1000001) or a mnemonic (LF, CR, TAB, SPACE). Clear the box to see all 128 codes.

ASCII table

Control codes (0–31)

Non-printing codes that signal actions — newlines, tabs, end-of-text and terminal control — shown by mnemonic, with their C escape where one exists.

CharDecHexOctBinaryEscapeName
NUL00000000000000\0Null character
SOH10100100000001Start of heading
STX20200200000010Start of text
ETX30300300000011End of text
EOT40400400000100End of transmission
ENQ50500500000101Enquiry
ACK60600600000110Acknowledge
BEL70700700000111\aBell / alert
BS80801000001000\bBackspace
HT90901100001001\tHorizontal tab
LF100A01200001010\nLine feed (newline)
VT110B01300001011\vVertical tab
FF120C01400001100\fForm feed (page break)
CR130D01500001101\rCarriage return
SO140E01600001110Shift out
SI150F01700001111Shift in
DLE161002000010000Data link escape
DC1171102100010001Device control 1 (XON)
DC2181202200010010Device control 2
DC3191302300010011Device control 3 (XOFF)
DC4201402400010100Device control 4
NAK211502500010101Negative acknowledge
SYN221602600010110Synchronous idle
ETB231702700010111End of transmission block
CAN241803000011000Cancel
EM251903100011001End of medium
SUB261A03200011010Substitute
ESC271B03300011011\eEscape
FS281C03400011100File separator
GS291D03500011101Group separator
RS301E03600011110Record separator
US311F03700011111Unit separator

Printable characters (32–126)

Space, digits, punctuation and the Latin letters A–Z and a–z, named by their Unicode character names.

CharDecHexOctBinaryEscapeName
SPACE322004000100000SPACE
!332104100100001EXCLAMATION MARK
"342204200100010QUOTATION MARK
#352304300100011NUMBER SIGN
$362404400100100DOLLAR SIGN
%372504500100101PERCENT SIGN
&382604600100110AMPERSAND
'392704700100111APOSTROPHE
(402805000101000LEFT PARENTHESIS
)412905100101001RIGHT PARENTHESIS
*422A05200101010ASTERISK
+432B05300101011PLUS SIGN
,442C05400101100COMMA
-452D05500101101HYPHEN-MINUS
.462E05600101110FULL STOP
/472F05700101111SOLIDUS
0483006000110000DIGIT ZERO
1493106100110001DIGIT ONE
2503206200110010DIGIT TWO
3513306300110011DIGIT THREE
4523406400110100DIGIT FOUR
5533506500110101DIGIT FIVE
6543606600110110DIGIT SIX
7553706700110111DIGIT SEVEN
8563807000111000DIGIT EIGHT
9573907100111001DIGIT NINE
:583A07200111010COLON
;593B07300111011SEMICOLON
<603C07400111100LESS-THAN SIGN
=613D07500111101EQUALS SIGN
>623E07600111110GREATER-THAN SIGN
?633F07700111111QUESTION MARK
@644010001000000COMMERCIAL AT
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
[915B13301011011LEFT SQUARE BRACKET
\925C13401011100REVERSE SOLIDUS
]935D13501011101RIGHT SQUARE BRACKET
^945E13601011110CIRCUMFLEX ACCENT
_955F13701011111LOW LINE
`966014001100000GRAVE ACCENT
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
{1237B17301111011LEFT CURLY BRACKET
|1247C17401111100VERTICAL LINE
}1257D17501111101RIGHT CURLY BRACKET
~1267E17601111110TILDE

Delete (127)

CharDecHexOctBinaryEscapeName
DEL1277F17701111111Delete

FreeNo sign-upPrivate — runs in your browser, nothing is uploaded

Checked against 17 reference cases · ANSI X3.4-1968, man7.org, Unicode · Reviewed · Updated · How we check

Quick answer

ASCII is a 7-bit character encoding that maps the integers 0–127 to characters. Codes 0–31 and 127 are non-printing control codes (like NUL, LF, CR, and DEL), code 32 is the space, and codes 33–126 are printable punctuation, digits, and the Latin letters A–Z and a–z. For example, the letter "A" is decimal 65, hex 0x41, octal 101, and binary 01000001.

Formula & method

The table is generated from a fixed list of all 128 ASCII codes. For each code the tool computes the hexadecimal value (base 16, two digits), the octal value (base 8, three digits), and the binary value (base 2, eight bits) directly from the decimal number. Printable codes (32–126) show the actual character; control codes (0–31, plus 127) show their standard mnemonic and C escape sequence where one exists. The search box accepts a decimal number, a hex value (with "0x"), a binary value (with "0b"), an octal value (with "0o"), a control-code mnemonic like LF or SPACE, or a single character, and the lookup card shows the matching code. A bare number is read as decimal, so type 0o101 for octal — and the table below filters to every matching row. Everything runs in your browser — nothing is uploaded.

Examples

Example 1: Look up the letter A

Input
A
Result
dec 65, hex 0x41, oct 101, bin 01000001
Why
Uppercase A is ASCII code 65. Lowercase 'a' is 32 higher, at code 97 (0x61).

Example 2: Decode hex 0x41

Input
0x41
Result
Character A (dec 65, oct 101, bin 01000001)
Why
Typing a hex value resolves to its character — 0x41 is 65 in decimal, which is 'A'.

Example 3: Find the newline control code

Input
LF
Result
dec 10, hex 0x0A, oct 012, bin 00001010, escape \n
Why
Typing the mnemonic LF resolves to code 10, the Unix newline (line feed). CR (carriage return) is code 13; Windows line endings use CR+LF together.

Example 4: The space character

Input
32
Result
SPACE — dec 32, hex 0x20, oct 040, bin 00100000
Why
A bare number is read as decimal, so 32 is the first printable code. Everything below it (0–31) is a non-printing control code.

Example 5: The DEL code

Input
127
Result
DEL — dec 127, hex 0x7F, oct 177, bin 01111111
Why
127 is the highest 7-bit value (all seven bits set) and is the DEL control code, historically used to punch out a tape position.

When to use this tool

  • Converting a character to its decimal, hex, octal, or binary code (or the reverse) while coding or debugging.
  • Identifying a stray control character — such as a tab, carriage return, or null byte — in a file or network payload.
  • Looking up the right escape sequence (like \n, \t, or \0) for a string in C, JavaScript, Python, or a regular expression.
  • Teaching or learning how text is stored as numbers and how the same value looks in different bases.
  • Building or validating data formats that reserve specific ASCII codes, such as delimiters (0x1F unit separator) or terminators.

Common mistakes

  • Assuming ASCII covers characters above 127. Standard ASCII is 7-bit and stops at 127; bytes 128–255 are 'extended ASCII' that depend on a code page (Latin-1, Windows-1252, etc.) and are not part of ASCII proper.
  • Confusing the digit characters with their numeric values. The character '0' is code 48, not 0, and '9' is 57 — a frequent source of bugs when converting text digits to numbers.
  • Mixing up CR (13) and LF (10). Unix uses LF alone for a newline, classic Mac OS used CR alone, and Windows uses CR+LF, so a stray \r can break parsing.
  • Treating uppercase and lowercase as unrelated. 'A' is 65 and 'a' is 97 — they differ by exactly 32 (one bit, 0x20), which is why bit-flipping toggles letter case.
  • Reading hex 0x20 as a printable symbol. 0x20 is the space character, which is visible only as blank — not 'nothing'.

Frequently asked questions

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding that assigns the numbers 0 to 127 to letters, digits, punctuation, and control codes. It is a 7-bit standard, so it defines exactly 128 codes and forms the basis of UTF-8 for the first 128 code points.

What is the ASCII code for the letter A?

Uppercase 'A' is decimal 65, hex 0x41, octal 101, and binary 01000001. Lowercase 'a' is decimal 97 (0x61), exactly 32 higher than its uppercase form.

What are control characters in ASCII?

Control characters are codes 0–31 plus 127 (DEL). They are non-printing and signal actions rather than display a glyph — for example LF (10) starts a new line, CR (13) returns the cursor, HT (9) is a tab, and NUL (0) marks an empty value.

How do I look up a control code like LF or CR?

Type its mnemonic into the search box. LF resolves to code 10 (newline), CR to 13, TAB/HT to 9, NUL to 0, SPACE to 32, and DEL to 127. The lookup card and the table both show the matching row with its dec, hex, octal, binary, and escape sequence.

What is the difference between ASCII and Unicode?

ASCII defines only 128 characters (codes 0–127). Unicode is a much larger standard covering virtually every writing system, but it was designed so its first 128 code points are identical to ASCII, which is why ASCII text is also valid UTF-8.

How do I convert a character to its binary value?

Type the character into the search box; the tool shows its 8-bit binary value. For example 'A' is 01000001. Each ASCII code fits in seven bits, so it is padded to eight bits (one byte) with a leading zero.

Why does ASCII only go up to 127?

ASCII is a 7-bit code, and seven bits can represent 2⁷ = 128 distinct values, numbered 0 through 127. Codes 128–255 require an eighth bit and belong to extended, code-page-specific encodings rather than standard ASCII.

Is my data uploaded when I use this tool?

No. The ASCII table is generated and searched entirely in your browser using JavaScript, so any character or code you type never leaves your device.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • Free
  • No sign-up
  • Runs entirely in your browser — nothing is uploaded.
  • Formula and method shown above

Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards below.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the tool to appear: