Free 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.

Examples: A, 65, 0x41, 0b01000001, LF, SPACE. For octal use the 0o prefix (e.g. 0o101). Clear the box to see all 128 codes.

Control codes (0–31)

Non-printing codes that signal actions β€” newlines, tabs, end-of-text, and terminal control. Shown with their mnemonic and C escape where one exists.

CharDecHexOctBinaryDescription
NUL\000000000000000Null character
SOH10100100000001Start of heading
STX20200200000010Start of text
ETX30300300000011End of text
EOT40400400000100End of transmission
ENQ50500500000101Enquiry
ACK60600600000110Acknowledge
BEL\a70700700000111Bell / alert
BS\b80801000001000Backspace
HT\t90901100001001Horizontal tab
LF\n100A01200001010Line feed (newline)
VT\v110B01300001011Vertical tab
FF\f120C01400001100Form feed (page break)
CR\r130D01500001101Carriage 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
ESC\e271B03300011011Escape
FS281C03400011100File separator
GS291D03500011101Group separator
RS301E03600011110Record separator
US311F03700011111Unit separator

Printable characters (32–126)

Space, digits, punctuation, and the Latin letters A–Z and a–z. These are the characters you actually see on screen.

CharDecHexOctBinaryDescription
SPACE322004000100000Space
!332104100100001Printable character β€œ!”
"342204200100010Printable character β€œ"”
#352304300100011Printable character β€œ#”
$362404400100100Printable character β€œ$”
%372504500100101Printable character β€œ%”
&382604600100110Printable character β€œ&”
'392704700100111Printable character β€œ'”
(402805000101000Printable character β€œ(”
)412905100101001Printable character β€œ)”
*422A05200101010Printable character β€œ*”
+432B05300101011Printable character β€œ+”
,442C05400101100Printable character β€œ,”
-452D05500101101Printable character β€œ-”
.462E05600101110Printable character β€œ.”
/472F05700101111Printable character β€œ/”
0483006000110000Printable character β€œ0”
1493106100110001Printable character β€œ1”
2503206200110010Printable character β€œ2”
3513306300110011Printable character β€œ3”
4523406400110100Printable character β€œ4”
5533506500110101Printable character β€œ5”
6543606600110110Printable character β€œ6”
7553706700110111Printable character β€œ7”
8563807000111000Printable character β€œ8”
9573907100111001Printable character β€œ9”
:583A07200111010Printable character β€œ:”
;593B07300111011Printable character β€œ;”
<603C07400111100Printable character β€œ<”
=613D07500111101Printable character β€œ=”
>623E07600111110Printable character β€œ>”
?633F07700111111Printable character β€œ?”
@644010001000000Printable character β€œ@”
A654110101000001Printable character β€œA”
B664210201000010Printable character β€œB”
C674310301000011Printable character β€œC”
D684410401000100Printable character β€œD”
E694510501000101Printable character β€œE”
F704610601000110Printable character β€œF”
G714710701000111Printable character β€œG”
H724811001001000Printable character β€œH”
I734911101001001Printable character β€œI”
J744A11201001010Printable character β€œJ”
K754B11301001011Printable character β€œK”
L764C11401001100Printable character β€œL”
M774D11501001101Printable character β€œM”
N784E11601001110Printable character β€œN”
O794F11701001111Printable character β€œO”
P805012001010000Printable character β€œP”
Q815112101010001Printable character β€œQ”
R825212201010010Printable character β€œR”
S835312301010011Printable character β€œS”
T845412401010100Printable character β€œT”
U855512501010101Printable character β€œU”
V865612601010110Printable character β€œV”
W875712701010111Printable character β€œW”
X885813001011000Printable character β€œX”
Y895913101011001Printable character β€œY”
Z905A13201011010Printable character β€œZ”
[915B13301011011Printable character β€œ[”
\925C13401011100Printable character β€œ\”
]935D13501011101Printable character β€œ]”
^945E13601011110Printable character β€œ^”
_955F13701011111Printable character β€œ_”
`966014001100000Printable character β€œ`”
a976114101100001Printable character β€œa”
b986214201100010Printable character β€œb”
c996314301100011Printable character β€œc”
d1006414401100100Printable character β€œd”
e1016514501100101Printable character β€œe”
f1026614601100110Printable character β€œf”
g1036714701100111Printable character β€œg”
h1046815001101000Printable character β€œh”
i1056915101101001Printable character β€œi”
j1066A15201101010Printable character β€œj”
k1076B15301101011Printable character β€œk”
l1086C15401101100Printable character β€œl”
m1096D15501101101Printable character β€œm”
n1106E15601101110Printable character β€œn”
o1116F15701101111Printable character β€œo”
p1127016001110000Printable character β€œp”
q1137116101110001Printable character β€œq”
r1147216201110010Printable character β€œr”
s1157316301110011Printable character β€œs”
t1167416401110100Printable character β€œt”
u1177516501110101Printable character β€œu”
v1187616601110110Printable character β€œv”
w1197716701110111Printable character β€œw”
x1207817001111000Printable character β€œx”
y1217917101111001Printable character β€œy”
z1227A17201111010Printable character β€œz”
{1237B17301111011Printable character β€œ{”
|1247C17401111100Printable character β€œ|”
}1257D17501111101Printable character β€œ}”
~1267E17601111110Printable character β€œ~”

Delete (127)

CharDecHexOctBinaryDescription
DEL1277F17701111111Delete

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 to use
  • βœ“ No sign-up required
  • βœ“ 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.

Related tools

Embed this tool on your site

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