Skip to content

ASCII table — decimal, hex, octal and binary

The full ASCII and Latin-1 table with decimal, hexadecimal, octal and binary values, control-character names and the escapes that go with them.

  • Runs in your browser
  • Nothing you enter is sent
  • Free, no account

Showing 256 entries.

ASCII and Latin-1 characters in decimal, hex, octal and binary
DecHexOctBinaryCharDescription
00x0000000000000NULNull — terminates C strings\0
10x0100100000001SOHStart of heading
20x0200200000010STXStart of text
30x0300300000011ETXEnd of text — what Ctrl+C sends
40x0400400000100EOTEnd of transmission — what Ctrl+D sends
50x0500500000101ENQEnquiry
60x0600600000110ACKAcknowledge
70x0700700000111BELBell — makes the terminal beep\a
80x0801000001000BSBackspace\b
90x0901100001001HTHorizontal tab\t
100x0A01200001010LFLine feed — the newline on Unix and in HTTP\n
110x0B01300001011VTVertical tab\v
120x0C01400001100FFForm feed — page break\f
130x0D01500001101CRCarriage return — paired with LF on Windows\r
140x0E01600001110SOShift out
150x0F01700001111SIShift in
160x1002000010000DLEData link escape
170x1102100010001DC1Device control 1 (XON)
180x1202200010010DC2Device control 2
190x1302300010011DC3Device control 3 (XOFF)
200x1402400010100DC4Device control 4
210x1502500010101NAKNegative acknowledge
220x1602600010110SYNSynchronous idle
230x1702700010111ETBEnd of transmission block
240x1803000011000CANCancel
250x1903100011001EMEnd of medium
260x1A03200011010SUBSubstitute — end-of-file on Windows consoles
270x1B03300011011ESCEscape — starts every ANSI terminal sequence\e
280x1C03400011100FSFile separator
290x1D03500011101GSGroup separator
300x1E03600011110RSRecord separator
310x1F03700011111USUnit separator
320x2004000100000␠Space — percent-encodes to %20, or + in form data
330x2104100100001!Exclamation mark
340x2204200100010"Double quote — " in HTML"
350x2304300100011#Number sign / hash — starts the fragment in a URL
360x2404400100100$Dollar sign
370x2504500100101%Percent sign — starts a percent-encoded byte
380x2604600100110&Ampersand — & in HTML, separates query parameters&
390x2704700100111'Apostrophe — ' in HTML'
400x2805000101000(Left parenthesis
410x2905100101001)Right parenthesis
420x2A05200101010*Asterisk
430x2B05300101011+Plus sign — means a space in form-encoded data
440x2C05400101100,Comma
450x2D05500101101-Hyphen-minus
460x2E05600101110.Full stop
470x2F05700101111/Solidus / slash
480x30060001100000Digit 0
490x31061001100011Digit 1
500x32062001100102Digit 2
510x33063001100113Digit 3
520x34064001101004Digit 4
530x35065001101015Digit 5
540x36066001101106Digit 6
550x37067001101117Digit 7
560x38070001110008Digit 8
570x39071001110019Digit 9
580x3A07200111010:Colon
590x3B07300111011;Semicolon
600x3C07400111100<Less-than — &lt; in HTML&lt;
610x3D07500111101=Equals sign
620x3E07600111110>Greater-than — &gt; in HTML&gt;
630x3F07700111111?Question mark — starts the query string
640x4010001000000@Commercial at
650x4110101000001ACapital letter A
660x4210201000010BCapital letter B
670x4310301000011CCapital letter C
680x4410401000100DCapital letter D
690x4510501000101ECapital letter E
700x4610601000110FCapital letter F
710x4710701000111GCapital letter G
720x4811001001000HCapital letter H
730x4911101001001ICapital letter I
740x4A11201001010JCapital letter J
750x4B11301001011KCapital letter K
760x4C11401001100LCapital letter L
770x4D11501001101MCapital letter M
780x4E11601001110NCapital letter N
790x4F11701001111OCapital letter O
800x5012001010000PCapital letter P
810x5112101010001QCapital letter Q
820x5212201010010RCapital letter R
830x5312301010011SCapital letter S
840x5412401010100TCapital letter T
850x5512501010101UCapital letter U
860x5612601010110VCapital letter V
870x5712701010111WCapital letter W
880x5813001011000XCapital letter X
890x5913101011001YCapital letter Y
900x5A13201011010ZCapital letter Z
910x5B13301011011[Left square bracket
920x5C13401011100\Reverse solidus / backslash — the escape character
930x5D13501011101]Right square bracket
940x5E13601011110^Circumflex accent
950x5F13701011111_Low line / underscore
960x6014001100000`Grave accent — the JavaScript template literal delimiter
970x6114101100001aSmall letter a
980x6214201100010bSmall letter b
990x6314301100011cSmall letter c
1000x6414401100100dSmall letter d
1010x6514501100101eSmall letter e
1020x6614601100110fSmall letter f
1030x6714701100111gSmall letter g
1040x6815001101000hSmall letter h
1050x6915101101001iSmall letter i
1060x6A15201101010jSmall letter j
1070x6B15301101011kSmall letter k
1080x6C15401101100lSmall letter l
1090x6D15501101101mSmall letter m
1100x6E15601101110nSmall letter n
1110x6F15701101111oSmall letter o
1120x7016001110000pSmall letter p
1130x7116101110001qSmall letter q
1140x7216201110010rSmall letter r
1150x7316301110011sSmall letter s
1160x7416401110100tSmall letter t
1170x7516501110101uSmall letter u
1180x7616601110110vSmall letter v
1190x7716701110111wSmall letter w
1200x7817001111000xSmall letter x
1210x7917101111001ySmall letter y
1220x7A17201111010zSmall letter z
1230x7B17301111011{Left curly bracket
1240x7C17401111100|Vertical line / pipe
1250x7D17501111101}Right curly bracket
1260x7E17601111110~Tilde
1270x7F17701111111DELDelete
1280x8020010000000—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1290x8120110000001—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1300x8220210000010—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1310x8320310000011—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1320x8420410000100—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1330x8520510000101—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1340x8620610000110—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1350x8720710000111—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1360x8821010001000—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1370x8921110001001—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1380x8A21210001010—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1390x8B21310001011—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1400x8C21410001100—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1410x8D21510001101—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1420x8E21610001110—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1430x8F21710001111—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1440x9022010010000—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1450x9122110010001—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1460x9222210010010—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1470x9322310010011—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1480x9422410010100—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1490x9522510010101—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1500x9622610010110—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1510x9722710010111—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1520x9823010011000—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1530x9923110011001—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1540x9A23210011010—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1550x9B23310011011—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1560x9C23410011100—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1570x9D23510011101—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1580x9E23610011110—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1590x9F23710011111—Unassigned in Latin-1 (C1 control range). Windows-1252 puts typographic characters here, which is where “smart quote” mojibake comes from.
1600xA024010100000 Non-breaking space — &nbsp;
1610xA124110100001¡Inverted exclamation mark
1620xA224210100010¢Cent sign
1630xA324310100011£Pound sign
1640xA424410100100¤Currency sign
1650xA524510100101¥Yen sign
1660xA624610100110¦Latin-1 character ¦
1670xA724710100111§Latin-1 character §
1680xA825010101000¨Latin-1 character ¨
1690xA925110101001©Copyright sign
1700xAA25210101010ªLatin-1 character ª
1710xAB25310101011«Left double angle quote
1720xAC25410101100¬Latin-1 character ¬
1730xAD25510101101­Latin-1 character ­
1740xAE25610101110®Registered sign
1750xAF25710101111¯Latin-1 character ¯
1760xB026010110000°Degree sign
1770xB126110110001±Plus-minus sign
1780xB226210110010²Latin-1 character ²
1790xB326310110011³Latin-1 character ³
1800xB426410110100´Acute accent
1810xB526510110101µLatin-1 character µ
1820xB626610110110Latin-1 character ¶
1830xB726710110111·Middle dot
1840xB827010111000¸Latin-1 character ¸
1850xB927110111001¹Latin-1 character ¹
1860xBA27210111010ºLatin-1 character º
1870xBB27310111011»Right double angle quote
1880xBC27410111100¼Latin-1 character ¼
1890xBD27510111101½Latin-1 character ½
1900xBE27610111110¾Latin-1 character ¾
1910xBF27710111111¿Inverted question mark
1920xC030011000000ÀLatin-1 character À
1930xC130111000001ÁLatin-1 character Á
1940xC230211000010ÂLatin-1 character Â
1950xC330311000011ÃLatin-1 character Ã
1960xC430411000100ÄLatin-1 character Ä
1970xC530511000101ÅLatin-1 character Å
1980xC630611000110ÆLatin-1 character Æ
1990xC730711000111ÇLatin-1 character Ç
2000xC831011001000ÈLatin-1 character È
2010xC931111001001ÉLatin-1 character É
2020xCA31211001010ÊLatin-1 character Ê
2030xCB31311001011ËLatin-1 character Ë
2040xCC31411001100ÌLatin-1 character Ì
2050xCD31511001101ÍLatin-1 character Í
2060xCE31611001110ÎLatin-1 character Î
2070xCF31711001111ÏLatin-1 character Ï
2080xD032011010000ÐLatin-1 character Ð
2090xD132111010001ÑLatin-1 character Ñ
2100xD232211010010ÒLatin-1 character Ò
2110xD332311010011ÓLatin-1 character Ó
2120xD432411010100ÔLatin-1 character Ô
2130xD532511010101ÕLatin-1 character Õ
2140xD632611010110ÖLatin-1 character Ö
2150xD732711010111×Multiplication sign
2160xD833011011000ØLatin-1 character Ø
2170xD933111011001ÙLatin-1 character Ù
2180xDA33211011010ÚLatin-1 character Ú
2190xDB33311011011ÛLatin-1 character Û
2200xDC33411011100ÜLatin-1 character Ü
2210xDD33511011101ÝLatin-1 character Ý
2220xDE33611011110ÞLatin-1 character Þ
2230xDF33711011111ßLatin-1 character ß
2240xE034011100000àLatin-1 character à
2250xE134111100001áLatin-1 character á
2260xE234211100010âLatin-1 character â
2270xE334311100011ãLatin-1 character ã
2280xE434411100100äLatin-1 character ä
2290xE534511100101åLatin-1 character å
2300xE634611100110æLatin-1 character æ
2310xE734711100111çLatin-1 character ç
2320xE835011101000èLatin-1 character è
2330xE935111101001éLatin-1 character é
2340xEA35211101010êLatin-1 character ê
2350xEB35311101011ëLatin-1 character ë
2360xEC35411101100ìLatin-1 character ì
2370xED35511101101íLatin-1 character í
2380xEE35611101110îLatin-1 character î
2390xEF35711101111ïLatin-1 character ï
2400xF036011110000ðLatin-1 character ð
2410xF136111110001ñLatin-1 character ñ
2420xF236211110010òLatin-1 character ò
2430xF336311110011óLatin-1 character ó
2440xF436411110100ôLatin-1 character ô
2450xF536511110101õLatin-1 character õ
2460xF636611110110öLatin-1 character ö
2470xF736711110111÷Division sign
2480xF837011111000øLatin-1 character ø
2490xF937111111001ùLatin-1 character ù
2500xFA37211111010úLatin-1 character ú
2510xFB37311111011ûLatin-1 character û
2520xFC37411111100üLatin-1 character ü
2530xFD37511111101ýLatin-1 character ý
2540xFE37611111110þLatin-1 character þ
2550xFF37711111111ÿLatin-1 character ÿ
Your lookup never leaves this tab — check it yourself—

Starting the network probe…

The counter above wraps fetch, XMLHttpRequest and navigator.sendBeacon in this tab and counts every call. It does not block anything — it just reports.

Two ways to verify independently

  1. Turn off Wi-Fi or enable airplane mode, then use the tool. It keeps working, because the page is already fully loaded.
  2. Open your browser devtools, switch to the Network tab, clear it, and run the tool. No new row appears.

Why this matters

In 2025 researchers found that popular online formatters had retained tens of thousands of user-submitted snippets — JSONFormatter.org and CodeBeautify together exposed roughly 80,000 saved documents, many containing live cloud credentials, private keys and internal database connection strings, because “format this” quietly meant “upload this”. A separate incident exposed roughly 3.5 million user PDFs on a document-conversion service. The only structural fix is not sending the data in the first place: this site is served under a Content-Security-Policy whose connect-src contains no third-party origin, so a request off this device cannot be made even by accident.

The structure of the table

ASCII is a 7-bit code with 128 positions, standardised in 1963 and essentially unchanged since. It divides cleanly into four blocks of 32, and the boundaries were chosen so that common operations became single bit flips.

  • 0–31 plus 127 — control characters. Not printable; they instruct a device.
  • 32–63 — space, punctuation and the digits.
  • 64–95 — @, the uppercase letters, and five brackets.
  • 96–126 — backtick, the lowercase letters, and the braces.

Two consequences of that layout are still used constantly. Uppercase and lowercase differ by exactly one bit (0x20), so case conversion is c ^ 32. And a digit’s numeric value is its code minus 48, which is why c - '0' parses a digit in C.

Control characters that still matter

DecNameEscapeStill used for
0NUL\0Terminating C strings; a null byte in input is a classic injection vector
7BEL\aThe terminal beep, and the terminator of some OSC escape sequences
8BS\bBackspace
9HT\tTab — the delimiter in TSV, and in Makefiles
10LF\nNewline on Unix and in every internet protocol
12FF\fPage break in printed output and some source files
13CR\rPaired with LF as CRLF on Windows and in HTTP headers
27ESC\eStarts every ANSI terminal colour and cursor sequence
4EOT—What Ctrl+D sends: end of input
3ETX—What Ctrl+C sends: interrupt

The Ctrl-key mapping is not a coincidence: holding Ctrl clears the top two bits, so Ctrl+A is 1, Ctrl+C is 3 and Ctrl+[ is 27, which is why Escape and Ctrl+[ are the same keystroke in vim.

CR, LF and the line-ending problem

Unix and macOS end a line with LF alone. Windows uses CRLF, inherited from teletypes where the carriage physically returned and then the paper advanced. HTTP headers, SMTP and most internet protocols specify CRLF.

The symptoms are recognisable: a stray ^M at the end of every line in a diff, a shell script failing with “bad interpreter” because the shebang line ends in CR, and a comparison that fails between two apparently identical strings. Configure git’s core.autocrlf or add a .gitattributes and the problem stops recurring.

Above 127: where mojibake comes from

ASCII stops at 127. Everything above is a different standard, and the two that matter disagree in exactly the range people paste from.

ISO-8859-1 (Latin-1) leaves 128–159 as a second block of unused control codes. Windows-1252 fills that block with typographic characters: curly quotes, the em dash, the ellipsis, the euro sign. When a document containing those is declared as Latin-1 or UTF-8 and decoded as the other, you get the familiar corruption — a curly quote becoming “, an em dash becoming —. The 128–159 rows in the table above are marked so the source of that is visible.

ASCII and UTF-8

UTF-8 was designed so every ASCII byte encodes itself: any file containing only characters 0–127 is simultaneously valid ASCII and valid UTF-8. Characters above 127 use two to four bytes, each with the high bit set, so an ASCII parser reading UTF-8 never mistakes a continuation byte for a delimiter. That backwards compatibility is the single reason UTF-8 displaced every competing encoding.

Converting in code

JavaScript:  "A".charCodeAt(0)      // 65
             String.fromCharCode(65)  // "A"
             "🎉".codePointAt(0)      // 127881 — use this above U+FFFF
Python:      ord("A")   chr(65)
Go:          rune('A')  string(rune(65))
Shell:       printf '%d' "'A"   printf '\x41'

In JavaScript, prefer codePointAt and fromCodePoint over the charCode pair: the older functions work on UTF-16 code units, so they return half of a surrogate pair for emoji and other characters above U+FFFF.

Questions

What are the control characters for?

They date from teletypes and most are obsolete, but a handful run everything: 9 is tab, 10 is line feed (the newline on Unix and in every internet protocol), 13 is carriage return (paired with LF on Windows), 27 is escape, which begins every ANSI terminal colour sequence, and 0 terminates a C string.

Why do codes 128–159 show as unassigned?

Because in ISO-8859-1 they are a second block of control characters with no printable meaning. Windows-1252 puts curly quotes, the em dash and the euro sign there instead — which is precisely why a smart quote pasted from Word turns into “ when a page is mis-declared as Latin-1.

Is ASCII the same as UTF-8?

For the first 128 characters, yes: UTF-8 was designed so that every ASCII byte encodes itself. Above 127 they diverge completely — UTF-8 uses multi-byte sequences, Latin-1 uses single bytes. That compatibility is the reason UTF-8 won.

How do I convert a character to its code in code?

JavaScript: `"A".charCodeAt(0)` gives 65 and `String.fromCharCode(65)` reverses it. Python: `ord("A")` and `chr(65)`. For anything above U+FFFF use `codePointAt` and `fromCodePoint` in JavaScript — `charCodeAt` returns half a surrogate pair.