Skip to content

ASCII Table

All 128 ASCII codes in binary, decimal and hex. Click any value to copy it, or look up a letter, a code or a word.

v2026.10.10

Key facts

  • “A” is 65: 01000001 in binary and 0x41 in hex. “a” is 97 (01100001): small letters are 32 higher, one bit.

ASCII table, 0–127

0–31 · Control codes000xxxxx

CharDecHexBinary
00000000000
10100000001
20200000010
30300000011
40400000100
50500000101
60600000110
70700000111
80800001000
90900001001
100A00001010
110B00001011
120C00001100
130D00001101
140E00001110
150F00001111
161000010000
171100010001
181200010010
191300010011
201400010100
211500010101
221600010110
231700010111
241800011000
251900011001
261A00011010
271B00011011
281C00011100
291D00011101
301E00011110
311F00011111

32–63 · Symbols and digits001xxxxx

CharDecHexBinary
322000100000
332100100001
342200100010
352300100011
362400100100
372500100101
382600100110
392700100111
402800101000
412900101001
422A00101010
432B00101011
442C00101100
452D00101101
462E00101110
472F00101111
483000110000
493100110001
503200110010
513300110011
523400110100
533500110101
543600110110
553700110111
563800111000
573900111001
583A00111010
593B00111011
603C00111100
613D00111101
623E00111110
633F00111111

64–95 · Capital letters010xxxxx

CharDecHexBinary
644001000000
654101000001
664201000010
674301000011
684401000100
694501000101
704601000110
714701000111
724801001000
734901001001
744A01001010
754B01001011
764C01001100
774D01001101
784E01001110
794F01001111
805001010000
815101010001
825201010010
835301010011
845401010100
855501010101
865601010110
875701010111
885801011000
895901011001
905A01011010
915B01011011
925C01011100
935D01011101
945E01011110
955F01011111

96–127 · Small letters011xxxxx

CharDecHexBinary
966001100000
976101100001
986201100010
996301100011
1006401100100
1016501100101
1026601100110
1036701100111
1046801101000
1056901101001
1066A01101010
1076B01101011
1086C01101100
1096D01101101
1106E01101110
1116F01101111
1127001110000
1137101110001
1147201110010
1157301110011
1167401110100
1177501110101
1187601110110
1197701110111
1207801111000
1217901111001
1227A01111010
1237B01111011
1247C01111100
1257D01111101
1267E01111110
1277F01111111

Click any value to copy it. Each block shares its first three bits, so a row across the four blocks shares its last five: ^A, !, A and a all end in 00001.

How this works: Method, 8 sources, Checked against 10 worked examples,

How this works

Method

The table is generated from the codes themselves: each code is written in decimal, hex, octal and 8-bit binary, and the 33 control codes take their names from ANSI X3.4 and ECMA-6. Codes 128–255 are not ASCII; they are read from the published charts of three code pages (Windows-1252, ISO 8859-1 and DOS code page 437). HTML codes use the named entities of HTML 4.01 where one exists.

How it’s tested

10 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Changes

  • Rebuilt around the table: 8-bit binary, click to copy, one lookup box, control codes explained, extended ASCII in three code pages and a printable chart.
  • Added key facts about the most-used codes, such as A = 65 and the 32 gap between upper and lower case.
  • Redesigned: a 16-column chart, each character’s byte shown as eight bits, a ranked search by character, code or name, and any text turned into its codes.
  • Extended from 0–127 to the full 0–255 table with Latin-1, HTML entities, search and copy on click.
  • First published.

Every change on What’s new

How we make toolsReport a mistake

ASCII control characters (0–31 and 127)

Thirty-three codes are not characters you see but instructions, from the days of teleprinters and paper tape. A few still do real work (tab, line feed, carriage return, escape); most survive as keyboard shortcuts. Caret notation is how terminals print them: Ctrl plus the key 64 above the code, so Ctrl+C sends 3.

DecCodeWhat it does
0NULNull. Nothing: it fills space. C ends every string with it.^@ · \0 · 00000000
1SOHStart of Heading. Marked the start of a message’s heading (its address and routing) on a data link.^A · \x01 · 00000001
2STXStart of Text. Marked where a message’s heading ends and its text begins.^B · \x02 · 00000010
3ETXEnd of Text. Marked the end of the text. Ctrl+C sends it, and terminals use it to interrupt a program.^C · \x03 · 00000011
4EOTEnd of Transmission. Ended a transmission. Ctrl+D sends it, and Unix terminals read it as end of input.^D · \x04 · 00000100
5ENQEnquiry. Asked the station at the other end to reply (to say who it is or how it is).^E · \x05 · 00000101
6ACKAcknowledge. A yes from the receiver: the data arrived.^F · \x06 · 00000110
7BELBell. Rings the terminal’s bell, or flashes the screen.^G · \a · 00000111
8BSBackspace. Moves back one position.^H · \b · 00001000
9HTHorizontal Tab. Moves to the next tab stop: the Tab key.^I · \t · 00001001
10LFLine Feed. Moves to the next line: the newline of C and Unix, written \n.^J · \n · 00001010
11VTVertical Tab. Moves down to the next vertical tab stop. Rarely used today.^K · \v · 00001011
12FFForm Feed. Moves to the top of the next page on a printer.^L · \f · 00001100
13CRCarriage Return. Moves back to the start of the line. Email and HTTP end each line with CR then LF (13 10).^M · \r · 00001101
14SOShift Out. Switched to another character set until Shift In.^N · \x0e · 00001110
15SIShift In. Switched back to the standard character set.^O · \x0f · 00001111
16DLEData Link Escape. Changed the meaning of the next few characters on a data link.^P · \x10 · 00010000
17DC1Device Control 1. XON: resume sending. Ctrl+Q sends it in a terminal.^Q · \x11 · 00010001
18DC2Device Control 2. Switched a device on or into a special mode.^R · \x12 · 00010010
19DC3Device Control 3. XOFF: pause sending. Ctrl+S sends it, which freezes many terminals until Ctrl+Q.^S · \x13 · 00010011
20DC4Device Control 4. Switched a device off or stopped it.^T · \x14 · 00010100
21NAKNegative Acknowledge. A no from the receiver: the data arrived with errors.^U · \x15 · 00010101
22SYNSynchronous Idle. Kept a synchronous link in step when there was nothing else to send.^V · \x16 · 00010110
23ETBEnd of Transmission Block. Marked the end of a block of data.^W · \x17 · 00010111
24CANCancel. Said the data just sent is wrong and should be ignored.^X · \x18 · 00011000
25EMEnd of Medium. Marked the end of the used part of a tape or card.^Y · \x19 · 00011001
26SUBSubstitute. Stands in for a character that was invalid or garbled. Ctrl+Z sends it.^Z · \x1a · 00011010
27ESCEscape. Starts an escape sequence, such as the codes that colour terminal text (ESC [ 3 1 m is red).^[ · \x1b · 00011011
28FSFile Separator. Separates files: the largest of four nested separators.^\ · \x1c · 00011100
29GSGroup Separator. Separates groups of records.^] · \x1d · 00011101
30RSRecord Separator. Separates records.^^ · \x1e · 00011110
31USUnit Separator. Separates units (fields): the smallest of the four separators.^_ · \x1f · 00011111
127DELDelete. Erased a character on punched paper tape by punching out every hole. Programs ignore it as data.^? · \x7f · 01111111

Names from ANSI X3.4-1986 and ECMA-6; what they did from RFC 20; the C escapes from the Linux ascii(7) manual (\x1b works for any code in C, JavaScript and Python); the terminal keys from termios(3); CR LF line ends from RFC 5322 (email) and RFC 9112 (HTTP); the terminal colour code from ECMA-48.

Extended ASCII (128–255): it depends on the code page

ASCII stops at 127. It is a 7-bit code, and the eighth bit of a byte was left to others, so there is no single “extended ASCII”: each code page filled 128–255 its own way. Three are common:

  • Latin-1 (ISO/IEC 8859-1): accented letters and symbols from 160 to 255, with 128–159 kept for control codes. Its 256 values are the first 256 characters of Unicode.
  • Windows-1252 (Microsoft, chart): Latin-1 with printable characters in 128–159, such as € at 128 and curly quotes at 145–148. Five bytes (129, 141, 143, 144, 157) are unused. Browsers decode pages labelled ISO-8859-1, Latin-1 and even US-ASCII as Windows-1252 (WHATWG Encoding Standard).
  • Code page 437 (the IBM PC and DOS, chart): accented letters, box-drawing lines, shading blocks and Greek letters. This is the set many “extended ASCII” charts show.
The same byte in three code pages
ByteWindows-1252Latin-1DOS (CP437)
128 €C1Ç
147 “STSô
153 ™C1Ö
169 ©©⌐
201 ÉÉ╔
233 ééΘ
219 ÛÛ█
241 ññ±

That is why old text shows the wrong letters: the bytes were written in one code page and read in another. Today, use UTF-8: the 128 ASCII codes stay the same single bytes, and every other character takes two to four (RFC 3629), so é is C3 A9. Every character has a Unicode code point; look them up in the Unicode code charts, or turn text into its UTF-8 bytes with text to binary.

All 128 extended codes in three code pagesEach byte from 128 to 255 in Windows-1252, Latin-1 and DOS
DecHexWindows-1252Latin-1CP437
12880€C1Ç
12981—C1ü
13082‚BPHé
13183ƒNBHâ
13284„C1ä
13385…NELà
13486†SSAå
13587‡ESAç
13688ˆHTSê
13789‰HTJë
1388AŠVTSè
1398B‹PLDï
1408CŒPLUî
1418D—RIì
1428EŽSS2Ä
1438F—SS3Å
14490—DCSÉ
14591‘PU1æ
14692’PU2Æ
14793“STSô
14894”CCHö
14995•MWò
15096–SPAû
15197—EPAù
15298˜SOSÿ
15399™C1Ö
1549AšSCIÜ
1559B›CSI¢
1569CœST£
1579D—OSC¥
1589EžPM₧
1599FŸAPCƒ
160A0  á
161A1¡¡í
162A2¢¢ó
163A3££ú
164A4¤¤ñ
165A5¥¥Ñ
166A6¦¦ª
167A7§§º
168A8¨¨¿
169A9©©⌐
170AAªª¬
171AB««½
172AC¬¬¼
173AD­­¡
174AE®®«
175AF¯¯»
176B0°°░
177B1±±▒
178B2²²▓
179B3³³│
180B4´´┤
181B5µµ╡
182B6╢
183B7··╖
184B8¸¸╕
185B9¹¹╣
186BAºº║
187BB»»╗
188BC¼¼╝
189BD½½╜
190BE¾¾╛
191BF¿¿┐
192C0ÀÀ└
193C1ÁÁ┴
194C2ÂÂ┬
195C3ÃÃ├
196C4ÄÄ─
197C5ÅÅ┼
198C6ÆÆ╞
199C7ÇÇ╟
200C8ÈÈ╚
201C9ÉÉ╔
202CAÊÊ╩
203CBËË╦
204CCÌÌ╠
205CDÍÍ═
206CEÎÎ╬
207CFÏÏ╧
208D0ÐÐ╨
209D1ÑÑ╤
210D2ÒÒ╥
211D3ÓÓ╙
212D4ÔÔ╘
213D5ÕÕ╒
214D6ÖÖ╓
215D7××╫
216D8ØØ╪
217D9ÙÙ┘
218DAÚÚ┌
219DBÛÛ█
220DCÜÜ▄
221DDÝÝ▌
222DEÞÞ▐
223DFßß▀
224E0ààα
225E1ááß
226E2ââΓ
227E3ããπ
228E4ääΣ
229E5ååσ
230E6ææµ
231E7ççτ
232E8èèΦ
233E9ééΘ
234EAêêΩ
235EBëëδ
236ECìì∞
237EDííφ
238EEîîε
239EFïï∩
240F0ðð≡
241F1ññ±
242F2òò≥
243F3óó≤
244F4ôô⌠
245F5õõ⌡
246F6öö÷
247F7÷÷≈
248F8øø°
249F9ùù∙
250FAúú·
251FBûû√
252FCüüⁿ
253FDýý²
254FEþþ■
255FFÿÿ 

Why A is 65: reading ASCII in binary

The codes were laid out so that the bits do useful work. Read the binary column and four patterns stand out.

  • Letters count from 1. Capitals start at 64 + 1, so the last five bits of A are 00001 (1), of B 00010 (2), up to Z, 11010 (26).
  • Case is one bit. Small letters are 32 higher: A is 01000001 and a is 01100001. Only the bit worth 32 differs, so flipping it changes case.
  • Digits carry their value. 0 to 9 are 48 to 57, 0011 then the digit in four bits: 7 is 00110111. Subtract 48 to get the number.
  • Ctrl clears a bit. Ctrl+A is 1 and Ctrl+[ is 27 (Escape): the control code is the key’s code minus 64. That is why the four blocks line up, and why a row in the table pairs ^A, !, A and a.

Frequently Asked Questions

What is the ASCII code for @?

The at sign @ is 64 in decimal: 0x40 in hex, 01000000 in binary and 100 in octal. In HTML you can write it as @. It sits just before A (65), because the capital letters start at 64 + 1.

Why is A 65 in ASCII?

The capitals start at 64 + 1 so that the last five bits count the letters: A is 01000001 (1), B is 01000010 (2), up to Z at 90. Small letters are exactly 32 higher (a is 97), so upper and lower case differ by one bit.

What is the ASCII code for a space?

A space is 32: 0x20 in hex and 00100000 in binary. It is the first printable code; everything below it is a control code. The no-break space ( ) is a different character, 160 in Latin-1 and Windows-1252.

What is the difference between ASCII and Unicode?

ASCII has 128 codes (7 bits): English letters, digits, punctuation and 33 control codes. Unicode gives a number (a code point) to every character in every writing system, more than 150,000 of them, and its first 128 code points are ASCII. UTF-8, the usual way to store Unicode, keeps those 128 as the same single bytes, so plain ASCII text is already valid UTF-8; every other character takes two to four bytes.

What is extended ASCII?

Codes 128 to 255, which use the eighth bit of a byte. They are not part of ASCII and there is no single standard: each code page fills them its own way. Byte 128 is € in Windows-1252, a control code in Latin-1 (ISO 8859-1) and Ç in DOS code page 437. Switch the table to Extended to see each one.

Is ASCII 7-bit or 8-bit?

ASCII is a 7-bit code (0 to 127). Computers store it in 8-bit bytes with the first bit set to 0, which is why this table shows 8 bits: A is 01000001. RFC 20 describes exactly this: 7-bit ASCII in an 8-bit byte whose high-order bit is always 0.

What are ASCII control characters?

Codes 0 to 31 and 127 are 33 control characters: instructions for teleprinters and terminals rather than symbols. A few still matter: tab (9), line feed (10, the \n newline), carriage return (13, \r) and escape (27), which starts terminal colour codes. Most survive as keyboard shortcuts, such as Ctrl+C (3) and Ctrl+D (4).

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

In Python, ord('A') gives 65 and chr(65) gives 'A'; format(65, '08b') gives 01000001. In JavaScript, 'A'.charCodeAt(0) gives 65 and String.fromCharCode(65) gives 'A'. In C a char already holds its code, so (int)'A' is 65.