How to find a character's ASCII code
ASCII is a table that gives each of 128 characters a number from 0 to 127. Capital letters run from 65 (A) to 90 (Z), lower case from 97 (a) to 122 (z), and the digits 0 to 9 are 48 to 57. Codes 0 to 31 and 127 are control characters such as tab (9) and line feed (10).
To find a code, look the character up in the table below. Lower case letters are always 32 more than their capitals, which is why a is 97 and A is 65.
Example 1: Hello → 72 101 108 108 111
Look up each character's code
ASCII gives the numbers 0 to 127 to English letters, digits, punctuation and control characters. Unicode keeps the same numbers for those characters and adds codes for everything else.
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| H | 72 | 48 | 01001000 |
| e | 101 | 65 | 01100101 |
| l | 108 | 6C | 01101100 |
| l | 108 | 6C | 01101100 |
| o | 111 | 6F | 01101111 |
Codes: 72 101 108 108 111
Example 2: A1 z! → 65 49 32 122 33
Look up each character's code
ASCII gives the numbers 0 to 127 to English letters, digits, punctuation and control characters. Unicode keeps the same numbers for those characters and adds codes for everything else.
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| A | 65 | 41 | 01000001 |
| 1 | 49 | 31 | 00110001 |
| Space | 32 | 20 | 00100000 |
| z | 122 | 7A | 01111010 |
| ! | 33 | 21 | 00100001 |
Codes: 65 49 32 122 33
Printable ASCII table
Codes 32 to 126 in decimal and hex. Codes 0 to 31 and 127 are control characters, such as tab (9), line feed (10) and carriage return (13).
Where this comes up
- Programming exercises that compare, sort or shift characters by their codes, such as a Caesar cipher.
- Finding the code to type a character with an Alt code or to write an escape sequence such as \x41.
- Spotting invisible characters, for example a tab or non-breaking space that is breaking a CSV file or a password.
Frequently asked questions
What is the ASCII code for A?
Capital A is 65 (hex 41, binary 01000001). Lower case a is 97 (hex 61).
What happens with characters that are not ASCII?
ASCII only covers codes 0 to 127. For anything else, such as é or an emoji, the tool shows the Unicode code point, which uses the same numbers as ASCII for the first 128 characters. For example é is 233 and 😀 is 128512.
What about extended ASCII codes 128 to 255?
There is no single extended ASCII. Code pages such as Latin-1 and Windows-1252 used 128 to 255 for different characters. Latin-1 matches Unicode in that range, but Windows-1252 does not (€ is 128 in Windows-1252 and 8364 in Unicode), so this tool shows Unicode code points, which are unambiguous.
Is my text sent anywhere?
No. The conversion runs in your browser and nothing you type is uploaded.