How to Find the ASCII Code of Any Character (2026)
By Rui Barreira · Last updated: 18 June 2026
Every character you type — letters, digits, punctuation, control keys — has a numeric ASCII code behind it. ASCII (American Standard Code for Information Interchange) maps 128 characters to integers 0–127. Knowing these codes is useful when debugging encoding issues, writing low-level code, or understanding why a character behaves unexpectedly in a data pipeline.
How ASCII codes work
ASCII assigns a fixed integer to each character. Printable characters run from 32 (space) to 126 (~). Codes 0–31 and 127 are control characters — non-printable signals like newline (10), tab (9), carriage return (13), and delete (127). Extended ASCII (128–255) covers accented letters and symbols, but encodings vary by implementation, so stick to 0–127 for maximum portability.
In most programming languages you can get the ASCII code of a character in one call: ord('A') in Python, 'A'.charCodeAt(0) in JavaScript, (int)'A' in C or Java. Going the other direction — integer to character — is chr(65) in Python or String.fromCharCode(65) in JavaScript.
Common ASCII codes reference
| Character | Decimal | Hex | Notes |
|---|---|---|---|
| Space | 32 | 0x20 | First printable character |
| 0 – 9 | 48 – 57 | 0x30 – 0x39 | Digit '0' = 48, digit '9' = 57 |
| A – Z | 65 – 90 | 0x41 – 0x5A | Uppercase; 'A' = 65 |
| a – z | 97 – 122 | 0x61 – 0x7A | Lowercase; exactly 32 above uppercase |
| Newline (LF) | 10 | 0x0A | Unix line ending |
| Carriage return | 13 | 0x0D | Windows line ending uses CR+LF (13+10) |
| Tab | 9 | 0x09 | Horizontal tab |
| Delete | 127 | 0x7F | Last standard ASCII code |
Practical uses
The 32-point gap between uppercase and lowercase is intentional and useful: toggling bit 5 (OR with 32, AND with ~32) switches case without branching. Comparing charCodeAt(0) against 48–57 is a fast digit check. When a CSV parser silently drops a row, a hidden control character (code < 32) is often the culprit — converting the string to ASCII codes reveals it immediately. URL encoding replaces non-ASCII and reserved characters with %XX hex sequences, so knowing the hex column in the table above helps you read encoded URLs by eye.
Use the ASCII Code Converter to look up any character's decimal, hex, and binary codes instantly — no installation needed, all processing happens in your browser.
Frequently Asked Questions
- Is this tool free?
- Yes — completely free, no signup required. All processing happens in your browser.
- Does the tool work offline?
- Once loaded, most features work without an internet connection since everything runs client-side.