ASCII Table — Decimal, Hex, Octal, Binary & HTML Codes

All 128 ASCII codes in decimal, hex, octal and binary with HTML codes and control-character names, plus extended 128–255 and a text converter.

Text ↔ codes converter

Click any value to copy it. 128 of 128 codes shown.

ASCII table, codes 0 to 127
DecHexOctBinaryCharHTMLDescription
NULNull^@ · \0 · Terminates C strings
SOHStart of Heading^A
STXStart of Text^B
ETXEnd of Text^C · Ctrl+C in a terminal sends this (interrupt)
EOTEnd of Transmission^D · Ctrl+D: end of input on Unix terminals
ENQEnquiry^E
ACKAcknowledge^F
BELBell^G · \a · Makes the terminal beep
BSBackspace^H · \b
HTHorizontal Tab^I · \t
LFLine Feed^J · \n · Newline on Unix, Linux and macOS
VTVertical Tab^K · \v
FFForm Feed^L · \f · Page break
CRCarriage Return^M · \r · Windows line endings are CR LF (\r\n)
SOShift Out^N
SIShift In^O
DLEData Link Escape^P
DC1Device Control 1 (XON)^Q · Ctrl+Q resumes terminal output
DC2Device Control 2^R
DC3Device Control 3 (XOFF)^S · Ctrl+S pauses terminal output
DC4Device Control 4^T
NAKNegative Acknowledge^U
SYNSynchronous Idle^V
ETBEnd of Transmission Block^W
CANCancel^X
EMEnd of Medium^Y
SUBSubstitute^Z · Ctrl+Z: end of file in DOS/Windows text mode
ESCEscape^[ · \e · Starts ANSI terminal escape sequences; \e is a GCC/Bash extension, portable forms are \x1b and \033
FSFile Separator^\
GSGroup Separator^]
RSRecord Separator^^
USUnit Separator^_
Space
Exclamation mark
Quotation mark (double quote)
Number sign (hash)
Dollar sign
Percent sign
Ampersand
Apostrophe (single quote)
Left parenthesis
Right parenthesis
Asterisk
Plus sign
Comma
Hyphen-minus
Full stop (period)
Solidus (slash)
Digit zero
Digit one
Digit two
Digit three
Digit four
Digit five
Digit six
Digit seven
Digit eight
Digit nine
Colon
Semicolon
Less-than sign
Equals sign
Greater-than sign
Question mark
Commercial at
Capital letter A
Capital letter B
Capital letter C
Capital letter D
Capital letter E
Capital letter F
Capital letter G
Capital letter H
Capital letter I
Capital letter J
Capital letter K
Capital letter L
Capital letter M
Capital letter N
Capital letter O
Capital letter P
Capital letter Q
Capital letter R
Capital letter S
Capital letter T
Capital letter U
Capital letter V
Capital letter W
Capital letter X
Capital letter Y
Capital letter Z
Left square bracket
Reverse solidus (backslash)
Right square bracket
Circumflex accent (caret)
Low line (underscore)
Grave accent (backtick)
Small letter a
Small letter b
Small letter c
Small letter d
Small letter e
Small letter f
Small letter g
Small letter h
Small letter i
Small letter j
Small letter k
Small letter l
Small letter m
Small letter n
Small letter o
Small letter p
Small letter q
Small letter r
Small letter s
Small letter t
Small letter u
Small letter v
Small letter w
Small letter x
Small letter y
Small letter z
Left curly bracket
Vertical line (pipe)
Right curly bracket
Tilde
DELDelete^? · All seven holes punched on paper tape, so it could overwrite any character

Text ↔ ASCII codes

72 101 108 108 111 44 32 87 111 114 108 100 33
Hello

Prefixes 0x, \x, 0b, 0o, &#, &#x and U+ override the base per value.

Extended ASCII 128–255: three different tables

ASCII stops at 127. Bytes 128–255 depend on the code page. Windows-1252 is what Alt+0nnn types and what browsers use for “ISO-8859-1” labelled pages. True ISO-8859-1 has invisible C1 control codes at 128–159 (highlighted). CP437 is the original IBM PC / DOS set that Alt+nnn still uses on U.S. Windows.

Extended ASCII codes 128 to 255 in three code pages
DecHexWindows-1252ISO-8859-1CP437 (DOS)HTML (&#nnn;)
Euro signPAD Capital C with cedilla
undefinedHOP Small u with diaeresis
Single low-9 quotation markBPH Small e with acute
Florin (f with hook)NBH Small a with circumflex
Double low-9 quotation markIND Small a with diaeresis
Horizontal ellipsisNEL Small a with grave
DaggerSSA Small a with ring above
Double daggerESA Small c with cedilla
Modifier letter circumflex accentHTS Small e with circumflex
Per mille signHTJ Small e with diaeresis
Capital S with caronVTS Small e with grave
Single left-pointing angle quotation markPLD Small i with diaeresis
Latin capital ligature oePLU Small i with circumflex
undefinedRI Small i with grave
Capital Z with caronSS2 Capital A with diaeresis
undefinedSS3 Capital A with ring above
undefinedDCS Capital E with acute
Left single quotation markPU1 Small ae
Right single quotation mark (apostrophe)PU2 Capital ae
Left double quotation markSTS Small o with circumflex
Right double quotation markCCH Small o with diaeresis
BulletMW Small o with grave
En dashSPA Small u with circumflex
Em dashEPA Small u with grave
Small tildeSOS Small y with diaeresis
Trademark signSGC Capital O with diaeresis
Small s with caronSCI Capital U with diaeresis
Single right-pointing angle quotation markCSI Cent sign
Latin small ligature oeST Pound sign
undefinedOSC Yen sign
Small z with caronPM Peseta sign
Capital Y with diaeresisAPC Florin (f with hook)
Non-breaking spacesame Small a with acute
Inverted exclamation marksame Small i with acute
Cent signsame Small o with acute
Pound signsame Small u with acute
Currency signsame Small n with tilde
Yen signsame Capital N with tilde
Broken barsame Feminine ordinal indicator
Section signsame Masculine ordinal indicator
Diaeresissame Inverted question mark
Copyright signsame Reversed not sign
Feminine ordinal indicatorsame Not sign
Left guillemet («)same Vulgar fraction one half
Not signsame Vulgar fraction one quarter
Soft hyphensame Inverted exclamation mark
Registered signsame Left guillemet («)
Macronsame Right guillemet (»)
Degree signsame Light shade
Plus-minus signsame Medium shade
Superscript twosame Dark shade
Superscript threesame Box drawings light vertical
Acute accentsame Box drawings light vertical and left
Micro signsame Box drawings vertical single and left double
Pilcrow (paragraph sign)same Box drawings vertical double and left single
Middle dot (interpunct)same Box drawings down double and left single
Cedillasame Box drawings down single and left double
Superscript onesame Box drawings double vertical and left
Masculine ordinal indicatorsame Box drawings double vertical
Right guillemet (»)same Box drawings double down and left
Vulgar fraction one quartersame Box drawings double up and left
Vulgar fraction one halfsame Box drawings up double and left single
Vulgar fraction three quarterssame Box drawings up single and left double
Inverted question marksame Box drawings light down and left
Capital A with gravesame Box drawings light up and right
Capital A with acutesame Box drawings light up and horizontal
Capital A with circumflexsame Box drawings light down and horizontal
Capital A with tildesame Box drawings light vertical and right
Capital A with diaeresissame Box drawings light horizontal
Capital A with ring abovesame Box drawings light vertical and horizontal
Capital aesame Box drawings vertical single and right double
Capital C with cedillasame Box drawings vertical double and right single
Capital E with gravesame Box drawings double up and right
Capital E with acutesame Box drawings double down and right
Capital E with circumflexsame Box drawings double up and horizontal
Capital E with diaeresissame Box drawings double down and horizontal
Capital I with gravesame Box drawings double vertical and right
Capital I with acutesame Box drawings double horizontal
Capital I with circumflexsame Box drawings double vertical and horizontal
Capital I with diaeresissame Box drawings up single and horizontal double
Capital ethsame Box drawings up double and horizontal single
Capital N with tildesame Box drawings down single and horizontal double
Capital O with gravesame Box drawings down double and horizontal single
Capital O with acutesame Box drawings up double and right single
Capital O with circumflexsame Box drawings up single and right double
Capital O with tildesame Box drawings down single and right double
Capital O with diaeresissame Box drawings down double and right single
Multiplication signsame Box drawings vertical double and horizontal single
Capital O with strokesame Box drawings vertical single and horizontal double
Capital U with gravesame Box drawings light up and left
Capital U with acutesame Box drawings light down and right
Capital U with circumflexsame Full block
Capital U with diaeresissame Lower half block
Capital Y with acutesame Left half block
Capital thornsame Right half block
Small sharp ssame Upper half block
Small a with gravesame Greek small alpha
Small a with acutesame Small sharp s
Small a with circumflexsame Greek capital gamma
Small a with tildesame Greek small pi
Small a with diaeresissame Greek capital sigma
Small a with ring abovesame Greek small sigma
Small aesame Micro sign
Small c with cedillasame Greek small tau
Small e with gravesame Greek capital phi
Small e with acutesame Greek capital theta
Small e with circumflexsame Greek capital omega
Small e with diaeresissame Greek small delta
Small i with gravesame Infinity
Small i with acutesame Greek small phi
Small i with circumflexsame Greek small epsilon
Small i with diaeresissame Intersection
Small ethsame Identical to
Small n with tildesame Plus-minus sign
Small o with gravesame Greater-than or equal to
Small o with acutesame Less-than or equal to
Small o with circumflexsame Top half integral
Small o with tildesame Bottom half integral
Small o with diaeresissame Division sign
Division signsame Almost equal to
Small o with strokesame Degree sign
Small u with gravesame Bullet operator
Small u with acutesame Middle dot (interpunct)
Small u with circumflexsame Square root
Small u with diaeresissame Superscript latin small letter n
Small y with acutesame Superscript two
Small thornsame Black square
Small y with diaeresissame Non-breaking space

HTML note: browsers decode €–Ÿ as the Windows-1252 characters (so – shows –), but the correct reference is the Unicode one (–). Use the code point, not the byte.

Last verified: 2026-10-18 against RFC 20 (US-ASCII), the Unicode C0/C1 control charts and the Unicode Consortium's Windows-1252, ISO-8859-1 and CP437 mapping tables.

Sources: RFC 20: ASCII format for network interchange · Unicode: C0 Controls and Basic Latin chart (U+0000–U+007F) · Unicode: C1 Controls and Latin-1 Supplement chart (U+0080–U+00FF) · Unicode: Windows-1252 mapping · Unicode: CP437 mapping · WHATWG Encoding: windows-1252 index

Runs entirely in your browser. Text you convert is never sent anywhere. Browse all free tools.

Found a problem, or something that could be better? We read every message and we fix things quickly.

This ASCII table lists all 128 ASCII characters with their decimal, hexadecimal, octal and binary codes, the HTML reference for each, and the name, caret notation and escape sequence of every control character. Click any value to copy it, filter to just the control codes, letters, digits or punctuation, and use the converter under the table to turn text into ASCII codes or a list of codes back into text.

ASCII itself only covers 0 to 127. The codes from 128 to 255, often called extended ASCII, are not one standard, so instead of picking one the second table shows the three versions you are likely to meet: Windows-1252, which is what Windows' Alt+0nnn codes and most “Latin-1” web pages really use; true ISO-8859-1, which has invisible control codes at 128–159; and the original IBM PC code page 437 with its box-drawing characters. If you have bytes from a file, knowing which of the three it was written in is what decides the character.

How to use

  1. Find the character in the table, or use the filter chips to show only control codes, letters, digits or punctuation.
  2. Click any decimal, hex, octal, binary, character or HTML value to copy it.
  3. For bytes above 127, check the extended table and pick the column for the encoding your text uses (Windows-1252 if unsure).
  4. To convert a string, type it in the Text box and choose decimal, hex, octal or binary output; to decode, paste codes into the Codes box.

Frequently asked questions

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a 7-bit character code with 128 positions: 33 control codes (0–31 and 127) and 95 printable characters (32–126) covering the space, digits, English letters and common punctuation. It was first published in 1963, gained lowercase letters in 1967 and was last revised as ANSI X3.4-1986. Unicode and UTF-8 keep its first 128 characters unchanged.

What are the ASCII codes for A, a, 0 and space?

Capital A is 65 (hex 41), small a is 97 (hex 61), the digit 0 is 48 (hex 30) and the space is 32 (hex 20). Upper- and lowercase letters are exactly 32 apart, a single bit (0x20), and each digit's code is 48 plus its value, which is why code like c - '0' converts a digit character to its number.

Is extended ASCII (128–255) a standard?

No. ASCII is 7-bit and ends at 127. The upper half of an 8-bit byte was filled differently by different code pages: Windows-1252 and ISO-8859-1 for Western European text, code page 437 on the IBM PC, and many others for Greek, Cyrillic or Central European languages. Byte 233 is é in Windows-1252 and ISO-8859-1 but Θ in code page 437. Today, text should be stored as UTF-8 instead.

What is the difference between ASCII and UTF-8?

UTF-8 is a Unicode encoding that is backwards compatible with ASCII: the 128 ASCII characters are stored as the same single bytes, so a pure ASCII file is also valid UTF-8. Characters beyond ASCII take two to four bytes; é becomes C3 A9 and an emoji takes four bytes. Reading those bytes as Windows-1252 is what produces mojibake such as “é” for “é”.

What do \n, \r and \t mean in the ASCII table?

They are escape sequences for control codes: \n is Line Feed (10, 0x0A), \r is Carriage Return (13, 0x0D) and \t is Horizontal Tab (9). Linux and macOS end lines with LF, Windows with CR LF, and the classic Mac OS used CR alone. Other escapes are \0 for NUL (0), \a for Bell (7), \b for Backspace (8), \v for Vertical Tab (11) and \f for Form Feed (12).

How do I get the ASCII code of a character in code?

In JavaScript use 'A'.charCodeAt(0) (or codePointAt for characters beyond U+FFFF) and String.fromCharCode(65) to go back. In Python use ord('A') and chr(65). In C a char already is its code: (int)'A' is 65. Excel has =CODE("A") and =CHAR(65), though those use the system code page for values above 127.

How the ASCII table is laid out

The 128 codes fall into four rows of 32, and the layout was designed so that simple bit operations do useful work.

• 0–31: control codes. Holding Ctrl on a terminal clears bit 0x40 of the key, so Ctrl+M (77 → 13) sends Carriage Return and Ctrl+[ (91 → 27) sends Escape. That is where caret notation such as ^M and ^[ comes from.

• 32–63: space, punctuation and digits. The digits 0–9 are 48–57 (0x30–0x39), so the low four bits of a digit are its value.

• 64–95: @, the capital letters A–Z (65–90) and [ \ ] ^ _.

• 96–127: `, the small letters a–z (97–122), { | } ~ and DEL. Each lowercase letter is its capital plus 32, so flipping bit 0x20 changes case.

DEL is 127, all seven bits set, because on punched paper tape a mistaken character could be erased by punching out every hole.

Control characters you still run into

Most of the 33 control codes were for teleprinters and serial links and are unused today, but a handful matter in everyday programming.

• LF (10) and CR (13): line endings. A file with Windows CR LF endings opened on Linux shows ^M at line ends; git's core.autocrlf setting and most editors convert between the two.

• HT (9): the tab. TSV files and Makefiles depend on a real tab, not spaces.

• NUL (0): ends strings in C. A stray NUL in user input can truncate a string in C-based code and is a classic source of bugs.

• ESC (27): starts ANSI escape sequences, such as \x1b[31m for red text in a terminal.

• ETX (3), EOT (4) and SUB (26): what Ctrl+C, Ctrl+D and Ctrl+Z send. A Unix terminal turns Ctrl+C into an interrupt signal and Ctrl+D into end of input; Ctrl+Z marked end of file in DOS text files.

• BEL (7): printing it makes many terminals beep or flash.

Windows-1252, ISO-8859-1 and code page 437 compared

ISO-8859-1 (Latin-1) maps byte 128–159 to the C1 control codes and 160–255 to the characters that became Unicode's Latin-1 Supplement: non-breaking space, ¡ ¢ £, the accented letters and so on. Its code points equal its byte values, which is why Unicode U+00E9 is é and byte 233 is é.

Windows-1252 is identical from 160 to 255 but replaces the mostly unused C1 controls with 27 printable characters: € ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ. Five bytes (129, 141, 143, 144, 157) are undefined. Because so much “Latin-1” text was really Windows-1252, the WHATWG Encoding Standard tells browsers to decode both labels as Windows-1252, and HTML treats – as – for the same reason.

Code page 437 is the original IBM PC set: accented letters in a different order, Greek letters and math signs, and the box-drawing and shading characters (░ ▒ ▓ │ ┤ ╣ ║) that DOS programs drew their screens with. It survives in Windows' Alt+nnn codes and in some barcode printers, terminals and old file formats.

Related free tools

  • Number Base Converter — Convert integers of any size between binary, octal, decimal, hex, base 32, base 36 and any base 2–36, with a two's complement view.
  • HTML Entity Encoder — Escape text for HTML with named or numeric entities, decode &-style references back to characters, and search an entity reference table.
  • URL Encoder / Decoder — Percent-encode or decode text for URLs in component, full-URL or form mode, and edit a URL's query parameters in a table.
  • Alt Codes & Mac Symbols — Every Windows Alt code and Mac Option shortcut for 600+ symbols, with HTML entities and Unicode escapes. Search, filter, click to copy.
  • Copy & Paste Symbols — 1,200+ text symbols in 22 groups: click to copy, collect several at once, and see each one's Alt code, Mac shortcut and HTML entity.