Skip to content

ASCII Table and Character Code Chart

Find any ASCII character and its code in decimal, hex, octal or binary. Type text below to turn it into codes.

Type in either box. The other box follows.

Capital letter A

Click a row to copy its character. Shift+click copies the code.

All 128 ASCII codes with decimal, hex, octal and binary values, the character, its HTML code and its name
DecHexOctBinaryCharHTMLName
Control characters, 0 to 31
0000000000000noneNull Ctrl+@Marks the end of a text string in the C language.
1010010000001noneStart of Heading Ctrl+A
2020020000010noneStart of Text Ctrl+B
3030030000011noneEnd of Text Ctrl+CCtrl+C stops a running program in a terminal.
4040040000100noneEnd of Transmission Ctrl+DCtrl+D ends input in a Linux or macOS terminal.
5050050000101noneEnquiry Ctrl+E
6060060000110noneAcknowledge Ctrl+F
7070070000111noneBell Ctrl+GRang a real bell on teletypes. Terminals beep instead.
8080100001000noneBackspace Ctrl+HMoves back one place.
9090110001001	 	Horizontal Tab Ctrl+IThe Tab key.
100A0120001010
 
Line Feed Ctrl+JEnds a line on Linux and macOS.
110B0130001011noneVertical Tab Ctrl+K
120C0140001100noneForm Feed Ctrl+LStarted a new page on printers.
130D0150001101
Carriage Return Ctrl+MThe Enter key. Windows ends lines with CR LF.
140E0160001110noneShift Out Ctrl+N
150F0170001111noneShift In Ctrl+O
16100200010000noneData Link Escape Ctrl+P
17110210010001noneDevice Control 1 Ctrl+QAlso called XON. Ctrl+Q resumes terminal output.
18120220010010noneDevice Control 2 Ctrl+R
19130230010011noneDevice Control 3 Ctrl+SAlso called XOFF. Ctrl+S pauses terminal output.
20140240010100noneDevice Control 4 Ctrl+T
21150250010101noneNegative Acknowledge Ctrl+U
22160260010110noneSynchronous Idle Ctrl+V
23170270010111noneEnd of Transmission Block Ctrl+W
24180300011000noneCancel Ctrl+X
25190310011001noneEnd of Medium Ctrl+Y
261A0320011010noneSubstitute Ctrl+ZMarked the end of a file in old DOS text files.
271B0330011011noneEscape Ctrl+[The Esc key. Starts terminal color codes.
281C0340011100noneFile Separator Ctrl+\
291D0350011101noneGroup Separator Ctrl+]
301E0360011110noneRecord Separator Ctrl+^
311F0370011111noneUnit Separator Ctrl+_
Printable characters, 32 to 126
32200400100000 Space
33210410100001! !Exclamation mark
34220420100010" "Quotation mark (double quote)
35230430100011# #Number sign (hash)
36240440100100$ $Dollar sign
37250450100101% %Percent sign
38260460100110& &Ampersand
39270470100111' 'Apostrophe (single quote)
40280500101000( (Left parenthesis
41290510101001) )Right parenthesis
422A0520101010* *Asterisk
432B0530101011+ +Plus sign
442C0540101100, ,Comma
452D0550101101-Hyphen-minus
462E0560101110. .Full stop (period)
472F0570101111/ /Slash
483006001100000Digit zero
493106101100011Digit one
503206201100102Digit two
513306301100113Digit three
523406401101004Digit four
533506501101015Digit five
543606601101106Digit six
553706701101117Digit seven
563807001110008Digit eight
573907101110019Digit nine
583A0720111010: :Colon
593B0730111011&#59; ;Semicolon
603C0740111100< <Less-than sign
613D0750111101= =Equals sign
623E0760111110> >Greater-than sign
633F0770111111? ?Question mark
64401001000000@ @At sign
65411011000001ACapital letter A
66421021000010BCapital letter B
67431031000011CCapital letter C
68441041000100DCapital letter D
69451051000101ECapital letter E
70461061000110FCapital letter F
71471071000111GCapital letter G
72481101001000HCapital letter H
73491111001001ICapital letter I
744A1121001010JCapital letter J
754B1131001011KCapital letter K
764C1141001100LCapital letter L
774D1151001101MCapital letter M
784E1161001110NCapital letter N
794F1171001111OCapital letter O
80501201010000PCapital letter P
81511211010001QCapital letter Q
82521221010010RCapital letter R
83531231010011SCapital letter S
84541241010100TCapital letter T
85551251010101UCapital letter U
86561261010110VCapital letter V
87571271010111WCapital letter W
88581301011000XCapital letter X
89591311011001YCapital letter Y
905A1321011010ZCapital letter Z
915B1331011011[ [Left square bracket
925C1341011100\ \Backslash
935D1351011101] ]Right square bracket
945E1361011110^ ^Caret (circumflex)
955F1371011111_ _Underscore
96601401100000` `Grave accent (backtick)
97611411100001aSmall letter a
98621421100010bSmall letter b
99631431100011cSmall letter c
100641441100100dSmall letter d
101651451100101eSmall letter e
102661461100110fSmall letter f
103671471100111gSmall letter g
104681501101000hSmall letter h
105691511101001iSmall letter i
1066A1521101010jSmall letter j
1076B1531101011kSmall letter k
1086C1541101100lSmall letter l
1096D1551101101mSmall letter m
1106E1561101110nSmall letter n
1116F1571101111oSmall letter o
112701601110000pSmall letter p
113711611110001qSmall letter q
114721621110010rSmall letter r
115731631110011sSmall letter s
116741641110100tSmall letter t
117751651110101uSmall letter u
118761661110110vSmall letter v
119771671110111wSmall letter w
120781701111000xSmall letter x
121791711111001ySmall letter y
1227A1721111010zSmall letter z
1237B1731111011{ {Left curly bracket
1247C1741111100| |Vertical bar (pipe)
1257D1751111101} }Right curly bracket
1267E1761111110~Tilde
Control character 127
1277F1771111111noneDeleteAll seven holes punched. It blotted out a mistake on paper tape.
Codes 128 to 255 (extended)
Advertisement
An old teletype machine printing a strip of paper with small characters

Last checked by the TextEditor.com team

What is ASCII?

ASCII stands for American Standard Code for Information Interchange. People say it "ASS-kee". It is a list of 128 codes, numbered 0 to 127. Each number stands for one letter, digit, sign or control action. The letter A is 65, a space is 32 and the digit 7 is 55.

Work on it started in 1961 with a proposal by IBM engineer Bob Bemer. A committee of the American Standards Association published the first version in 1963. Every code fits in 7 bits. Teleprinters before it used a 5 bit code called ITA2, which had room for only 32 codes. It had to switch between a letter set and a figure set. For even older text codes, see our page of symbol alphabets like Morse and Braille. You can read the full history in the ASCII article on Wikipedia.

From ASCII to UTF-8
  1. 1963

    First ASCII standard

    Capital letters, digits, signs and control codes. The spots for small letters were still empty.

  2. 1967

    The big update

    This is the version still in use, with small letters at 97 to 122.

  3. 1981

    IBM PC and code page 437

    Codes 128 to 255 get accented letters, Greek letters and box drawing lines.

  4. 1987

    ISO 8859-1

    A shared upper half for Western European languages.

  5. 1991

    Unicode 1.0

    One number for every character. The first 128 are ASCII.

  6. 1993

    UTF-8 presented

    Stores ASCII as one byte and everything else as 2 to 4 bytes.

  7. 2008

    UTF-8 leads the web

    It becomes the most common text encoding on web pages.

How to read the ASCII table

Each row shows one number written four ways. Decimal is the normal way to count, with ten digits. Hex, short for hexadecimal, uses 16 digits: 0 to 9 and then A to F. Octal uses 8 digits. Binary uses only 0 and 1, which is how the computer stores it.

So the letter A is 65 in decimal, 41 in hex, 101 in octal and 1000001 in binary. All four are the same number. Programmers like hex because two hex digits always make one byte of 8 bits.

Flip the bits to build a character
A
Decimal656 × 10 + 5
Hex414 × 16 + 1
Octal1011 × 64 + 0 × 8 + 1
Binary100000164 + 1

Each switch is one bit. Add up the values of the bits that are on, and you get the code.

The chart view of the table uses hex too. The row is the first hex digit and the column is the second. A sits in row 4, column 1, so its hex code is 41.

Why uppercase and lowercase are 32 apart

A is 65 and a is 97. The gap is 32, and 32 is one single bit in binary. It is called bit 5, counting from 0 on the right. Capital letters have this bit off. Small letters have it on. Flip that one bit and the letter changes case.

This was planned. The committee put the small letters exactly one bit away from the capitals. That made keyboards and printers simpler to build, and it made it easy to compare text without caring about case.

Type a word and flip bit 5
LetterCodeBinaryBit 5 flippedNew codeResult
H7210010001101000104h
e1011100101100010169E
l1081101100100110076L
l1081101100100110076L
o1111101111100111179O

The bold digit is bit 5. Only letters are flipped. For a digit or a sign, the same flip gives a different symbol or a control code.

Digits have a trick of their own. The digits 0 to 9 sit at codes 48 to 57, so a digit's value is its code minus 48. In hex they are 30 to 39, and the last hex digit is the digit itself.

Advertisement

Control characters: the invisible 33

Codes 0 to 31 and code 127 do not print anything. They are commands. They told teletypes and printers to start a new line, to move back or to stop. The Teletype Model 33 even had a real bell that rang when it got code 7, BEL.

You can type each one with the Ctrl key. Ctrl plus a letter gives that letter's code minus 64. So Ctrl+G is 7, the bell. Ctrl+H is 8, backspace. Ctrl+M is 13, carriage return. Terminals still show these codes as ^G, ^H and ^M.

Most control codes are history now. These are the ones you still meet today:

CodeNameWhere you meet it
9HT Horizontal TabThe Tab key. Also splits columns in tab separated files (TSV).
10LF Line FeedEnds every line in Linux and macOS files and in most web text.
13CR Carriage ReturnThe Enter key. Windows files end lines with CR LF (13 10).
27ESC EscapeThe Esc key. Terminal color codes start with it.
8BS BackspaceBackspace in terminals and some old keyboards.
0NUL NullMarks the end of a string in C. Also fills empty space in files.
127DEL DeleteSent by the Backspace key in many Linux and macOS terminals.

The names CR and LF come from typewriters. Carriage return moved the print head back to the left side. Line feed rolled the paper up one line. Windows still ends each line with both. Linux and macOS use LF alone. That is why a file from one system can show up as one long line on the other.

Printable characters from space to tilde

Codes 32 to 126 are the 95 printable characters. The space comes first and the tilde (~) comes last. Every key on a US keyboard is in this range. The chart below colors them by group. Click one to copy it.

Codes 32 to 127 in rows of 16
First hex digit0123456789ABCDEF
2
3
4
5
6
7

Symbols and space: 33Digits: 10Capital letters: 26Small letters: 26Delete, a control code: 1

The 32 symbols are the ones password rules mean when they ask for "a special character". Our password generator can add them for you.

What is extended ASCII?

ASCII uses 7 bits, but computers store text in bytes of 8 bits. That leaves 128 more codes, from 128 to 255. ASCII never said what goes there, so each maker filled them in its own way. Each of these sets is called a code page.

The first IBM PC came with code page 437. It has accented letters, Greek letters and the box drawing lines that old DOS programs used to draw windows. You can still copy those box drawing characters or use them in text frames. ISO 8859-1 holds accented letters for Western European languages. Windows-1252 is almost the same, but it also fills 128 to 159 with curly quotes, the euro sign and a few more.

So "extended ASCII" is not one standard. The same byte shows a different character on each code page.

One byte, three code pages
Code pageCharacter
Windows-1252é U+00E9
ISO 8859-1é U+00E9
Code page 437Θ U+0398

Byte 233 is E9 in hex and 11101001 in binary.

Alt codes on Windows show the same thing. On a US Windows PC, Alt+233 uses the old code page 437 and types Θ. Alt+0233, with the zero in front, uses Windows-1252 and types é.

All codes from 128 to 255

Not ASCII. These codes depend on the code page.

Codes 128 to 255 in Windows-1252, ISO 8859-1 and code page 437
DecHexWindows-1252ISO 8859-1Code page 437
12880€ U+20ACcontrolÇ U+00C7
12981unusedcontrolü U+00FC
13082‚ U+201Acontrolé U+00E9
13183ƒ U+0192controlâ U+00E2
13284„ U+201Econtrolä U+00E4
13385… U+2026controlà U+00E0
13486† U+2020controlå U+00E5
13587‡ U+2021controlç U+00E7
13688ˆ U+02C6controlê U+00EA
13789‰ U+2030controlë U+00EB
1388AŠ U+0160controlè U+00E8
1398B‹ U+2039controlï U+00EF
1408CŒ U+0152controlî U+00EE
1418Dunusedcontrolì U+00EC
1428EŽ U+017DcontrolÄ U+00C4
1438FunusedcontrolÅ U+00C5
14490unusedcontrolÉ U+00C9
14591‘ U+2018controlæ U+00E6
14692’ U+2019controlÆ U+00C6
14793“ U+201Ccontrolô U+00F4
14894” U+201Dcontrolö U+00F6
14995• U+2022controlò U+00F2
15096en dashcontrolû U+00FB
15197em dashcontrolù U+00F9
15298˜ U+02DCcontrolÿ U+00FF
15399™ U+2122controlÖ U+00D6
1549Aš U+0161controlÜ U+00DC
1559B› U+203Acontrol¢ U+00A2
1569Cœ U+0153control£ U+00A3
1579Dunusedcontrol¥ U+00A5
1589Ež U+017Econtrol₧ U+20A7
1599FŸ U+0178controlƒ U+0192
160A0NBSPNBSPá U+00E1
161A1¡ U+00A1¡ U+00A1í U+00ED
162A2¢ U+00A2¢ U+00A2ó U+00F3
163A3£ U+00A3£ U+00A3ú U+00FA
164A4¤ U+00A4¤ U+00A4ñ U+00F1
165A5¥ U+00A5¥ U+00A5Ñ U+00D1
166A6¦ U+00A6¦ U+00A6ª U+00AA
167A7§ U+00A7§ U+00A7º U+00BA
168A8¨ U+00A8¨ U+00A8¿ U+00BF
169A9© U+00A9© U+00A9⌐ U+2310
170AAª U+00AAª U+00AA¬ U+00AC
171AB« U+00AB« U+00AB½ U+00BD
172AC¬ U+00AC¬ U+00AC¼ U+00BC
173ADSHYSHY¡ U+00A1
174AE® U+00AE® U+00AE« U+00AB
175AF¯ U+00AF¯ U+00AF» U+00BB
176B0° U+00B0° U+00B0░ U+2591
177B1± U+00B1± U+00B1▒ U+2592
178B2² U+00B2² U+00B2▓ U+2593
179B3³ U+00B3³ U+00B3│ U+2502
180B4´ U+00B4´ U+00B4┤ U+2524
181B5µ U+00B5µ U+00B5╡ U+2561
182B6U+00B6U+00B6╢ U+2562
183B7· U+00B7· U+00B7╖ U+2556
184B8¸ U+00B8¸ U+00B8╕ U+2555
185B9¹ U+00B9¹ U+00B9╣ U+2563
186BAº U+00BAº U+00BA║ U+2551
187BB» U+00BB» U+00BB╗ U+2557
188BC¼ U+00BC¼ U+00BC╝ U+255D
189BD½ U+00BD½ U+00BD╜ U+255C
190BE¾ U+00BE¾ U+00BE╛ U+255B
191BF¿ U+00BF¿ U+00BF┐ U+2510
192C0À U+00C0À U+00C0└ U+2514
193C1Á U+00C1Á U+00C1┴ U+2534
194C2Â U+00C2Â U+00C2┬ U+252C
195C3Ã U+00C3Ã U+00C3├ U+251C
196C4Ä U+00C4Ä U+00C4─ U+2500
197C5Å U+00C5Å U+00C5┼ U+253C
198C6Æ U+00C6Æ U+00C6╞ U+255E
199C7Ç U+00C7Ç U+00C7╟ U+255F
200C8È U+00C8È U+00C8╚ U+255A
201C9É U+00C9É U+00C9╔ U+2554
202CAÊ U+00CAÊ U+00CA╩ U+2569
203CBË U+00CBË U+00CB╦ U+2566
204CCÌ U+00CCÌ U+00CC╠ U+2560
205CDÍ U+00CDÍ U+00CD═ U+2550
206CEÎ U+00CEÎ U+00CE╬ U+256C
207CFÏ U+00CFÏ U+00CF╧ U+2567
208D0Ð U+00D0Ð U+00D0╨ U+2568
209D1Ñ U+00D1Ñ U+00D1╤ U+2564
210D2Ò U+00D2Ò U+00D2╥ U+2565
211D3Ó U+00D3Ó U+00D3╙ U+2559
212D4Ô U+00D4Ô U+00D4╘ U+2558
213D5Õ U+00D5Õ U+00D5╒ U+2552
214D6Ö U+00D6Ö U+00D6╓ U+2553
215D7× U+00D7× U+00D7╫ U+256B
216D8Ø U+00D8Ø U+00D8╪ U+256A
217D9Ù U+00D9Ù U+00D9┘ U+2518
218DAÚ U+00DAÚ U+00DA┌ U+250C
219DBÛ U+00DBÛ U+00DB█ U+2588
220DCÜ U+00DCÜ U+00DC▄ U+2584
221DDÝ U+00DDÝ U+00DD▌ U+258C
222DEÞ U+00DEÞ U+00DE▐ U+2590
223DFß U+00DFß U+00DF▀ U+2580
224E0à U+00E0à U+00E0α U+03B1
225E1á U+00E1á U+00E1ß U+00DF
226E2â U+00E2â U+00E2Γ U+0393
227E3ã U+00E3ã U+00E3π U+03C0
228E4ä U+00E4ä U+00E4Σ U+03A3
229E5å U+00E5å U+00E5σ U+03C3
230E6æ U+00E6æ U+00E6µ U+00B5
231E7ç U+00E7ç U+00E7τ U+03C4
232E8è U+00E8è U+00E8Φ U+03A6
233E9é U+00E9é U+00E9Θ U+0398
234EAê U+00EAê U+00EAΩ U+03A9
235EBë U+00EBë U+00EBδ U+03B4
236ECì U+00ECì U+00EC∞ U+221E
237EDí U+00EDí U+00EDφ U+03C6
238EEî U+00EEî U+00EEε U+03B5
239EFï U+00EFï U+00EF∩ U+2229
240F0ð U+00F0ð U+00F0≡ U+2261
241F1ñ U+00F1ñ U+00F1± U+00B1
242F2ò U+00F2ò U+00F2≥ U+2265
243F3ó U+00F3ó U+00F3≤ U+2264
244F4ô U+00F4ô U+00F4⌠ U+2320
245F5õ U+00F5õ U+00F5⌡ U+2321
246F6ö U+00F6ö U+00F6÷ U+00F7
247F7÷ U+00F7÷ U+00F7≈ U+2248
248F8ø U+00F8ø U+00F8° U+00B0
249F9ù U+00F9ù U+00F9∙ U+2219
250FAú U+00FAú U+00FA· U+00B7
251FBû U+00FBû U+00FB√ U+221A
252FCü U+00FCü U+00FCⁿ U+207F
253FDý U+00FDý U+00FD² U+00B2
254FEþ U+00FEþ U+00FE■ U+25A0
255FFÿ U+00FFÿ U+00FFNBSP

On the first IBM PC, even the control codes 1 to 31 showed up as small pictures on screen, like ☺, ♥ and ♪. Code page 437 is the reason so much early text art looks the way it does.

ASCII vs Unicode and UTF-8

Unicode gives a number, called a code point, to every character in every script, plus emoji. Its first 128 code points, U+0000 to U+007F, are ASCII in the same order. Code point U+0041 is still the letter A.

UTF-8 is the usual way to store those code points as bytes. It writes each ASCII character as one byte with the same value as before, so a plain ASCII file is already a valid UTF-8 file. Other characters take 2 to 4 bytes. UTF-8 has been the most common encoding on the web since 2008.

Your text in ASCII, Unicode and UTF-8
CharASCII codeUnicodeUTF-8 bytes (hex)Bytes
C67U+0043431
a97U+0061611
f102U+0066661
énoneU+00E9C3 A92

4 characters, 5 bytes. Read by mistake as Windows-1252, the same bytes show as Café

That last line has a name: mojibake, or garbled text. The é in "Café" is two bytes in UTF-8, C3 and A9. A program that reads them as Windows-1252 shows two characters, Ã and ©. Highlighted rows in the table are the characters that need more than one byte.

To type characters beyond ASCII, use the Unicode keyboard, or search every character in the character picker.

Convert text to ASCII codes and back

Use the two boxes at the top of this page. Type in the Text box to get codes. Paste codes in the other box to get text back. Pick decimal, hex, octal or binary, and how to separate the codes. If you paste codes like 0x48 or 01001000, the tool works out the base for you.

Binary converters usually show 8 bits per character, like 01000001 for A. ASCII needs only 7, so the first bit is always 0. The converter shows all 8, and the table above leaves the extra 0 out.

Characters outside ASCII, like é or an emoji, have no ASCII code. The converter shows their Unicode code point instead, such as U+00E9, and tells you which characters they are.

In code, every common language has a built in way to do this:

LanguageCharacter to codeCode to character
JavaScript"A".charCodeAt(0) // 65String.fromCharCode(65) // "A"
Pythonord("A") # 65chr(65) # "A"
C(int)'A' // 65(char)65 // 'A'
Excel=CODE("A")=CHAR(65)

For characters beyond ASCII, use codePointAt and String.fromCodePoint in JavaScript. Python's ord and chr already work for all of Unicode.

More about characters and codes

Frequently asked questions

How many characters are in ASCII?

128, numbered 0 to 127. Of these, 95 are printable characters, counting the space. The other 33 are control codes: 0 to 31 and 127.

What is the ASCII code for space?

32 in decimal, 20 in hex and 0100000 in binary. In HTML you can write it as  . The non-breaking space,  , is a different character (160) and is not part of ASCII.

What is the ASCII value of A and a?

Capital A is 65 (hex 41). Small a is 97 (hex 61). The digit 0 is 48 (hex 30).

Is ASCII the same as Unicode?

No. ASCII has 128 characters. Unicode has more than 150,000. But the first 128 Unicode code points are exactly ASCII, so plain ASCII text is also valid Unicode text.

What is extended ASCII?

It is a loose name for codes 128 to 255 in 8 bit code pages. It is not one standard. Code page 437, ISO 8859-1 and Windows-1252 all put different characters there. See the extended table above.

What do CR and LF mean?

CR is carriage return, code 13. LF is line feed, code 10. Windows ends each line of a text file with both, CR LF. Linux and macOS use only LF.

How do I type an ASCII character with an Alt code?

On Windows, hold Alt and type the decimal code on the number pad, then let go of Alt. Alt+64 types @. For codes 128 to 255, the result depends on the code page, so add a 0 in front, like Alt+0233 for é. Macs do not use Alt codes.

How do I convert text to ASCII binary?

Type your text in the converter at the top of this page and pick Binary. "Hi" becomes 01001000 01101001. Each group of 8 bits is one character. For emoji and accented letters in binary, use the binary translator. To see the bytes in hex, use the encoder and decoder.

Why do I see strange symbols like é in old text files?

The file was saved as UTF-8 but opened as Windows-1252 or ISO 8859-1. Each accented letter is two bytes in UTF-8, and the program shows each byte as its own character. Open the file again and choose UTF-8 as the encoding.

  • Text framesPut a box, border or ASCII art frame around your text.
  • Symbol alphabetsSee your text in five symbol alphabets at once: Morse code, Braille, NATO words, flag semaphore and ASL letters.
  • Unicode keyboardClick to type fancy, accented and special letters from 50 Unicode alphabets.
  • All charactersFind any Unicode character by name or code, copy it, and get its HTML entity, CSS and JavaScript code.
  • Text cleanerPaste messy text and clean it in one click.

↑ ↓ to choose, Enter to open, Esc to close