How to use
- Type a character (A), decimal code (65), hex code (0x41) or name (line feed) in Find.
- Tick Printable characters only to hide control characters.
- Read the codes you need from the table.
Options explained
- Printable characters
- Codes 32–126, covering space, digits, letters and common punctuation.
- Control characters
- Codes 0–31 and 127. The ones you meet most are 9 tab (\t), 10 line feed (\n), 13 carriage return (\r) and 27 escape.
- Unicode
- The first 128 Unicode code points are identical to ASCII, so these characters take one byte in UTF-8.
Ranges worth remembering
| Codes (decimal) | Hex | What they are |
|---|---|---|
| 0–31 and 127 | 00–1F, 7F | Control characters |
| 32 | 20 | Space |
| 48–57 | 30–39 | Digits 0–9 |
| 65–90 | 41–5A | Uppercase A–Z |
| 97–122 | 61–7A | Lowercase a–z |
Two conversions come up often. A digit character minus 48 gives its value, so '7' (55) is 7. A letter’s position in the alphabet is its code minus 64 for uppercase or minus 96 for lowercase, so 'C' (67) is the 3rd letter. For example, A is 65, 0x41 or 01000001 in binary.
Frequently asked questions
How far apart are upper and lower case letters?
32. A is 65 and a is 97; setting bit 5 (0x20) turns an uppercase letter into lowercase.
What is the ASCII code for the digit 0?
48 (hex 30). Digits 0–9 are 48–57, so subtracting 48 gives the numeric value.
How do Windows and Unix line endings differ?
Windows uses carriage return plus line feed (13 10, \r\n); Linux and macOS use line feed alone (10, \n).
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.