The ASCII table explained: 128 codes that still run the internet
ASCII, the American Standard Code for Information Interchange, assigns a number from 0 to 127 to each character a basic English keyboard can produce. It is more than fifty years old, and it is still the base layer of almost every text format. UTF-8 keeps the same numbers for those 128 characters, so a file that is pure ASCII is also valid UTF-8.
The three ranges
- 0 to 31 and 127 are control characters. They were written for teletypes: line feed (10) and carriage return (13) are the ones you still meet, along with tab (9).
- 32 to 126 are printable. Space is 32, the digits 0 to 9 are 48 to 57, uppercase A to Z are 65 to 90, and lowercase a to z are 97 to 122.
- 128 and above are not ASCII. Code pages such as Windows-1252 used those values for accented letters, which is why the same byte can show different letters on different systems.
Why the case difference is 32
Uppercase and lowercase letters differ by exactly 32, which is the bit that has the value 32 in binary. That is why a case change can be done by flipping one bit, and why sorting code often uses a simple range check. This matters when you write a case converter. Anything outside the ASCII letters needs a proper Unicode rule.
Control characters that cause bugs
Invisible characters from the control range are a common source of errors. A stray carriage return makes a CSV import shift a row, and a zero-width character can break a comparison while looking identical on screen. The non-ASCII remover shows which characters fall outside the 7-bit range, and it runs in your browser.
Binary-safe text
When you need to send bytes through a channel that only accepts printable text, ASCII-safe encodings such as Base64 or Ascii85 represent binary data with printable characters. Ascii85 is denser than Base64, at about 25 percent overhead instead of 33 percent.
Quick reference
- A digit character is its code minus 48.
- An uppercase letter plus 32 is its lowercase form, in the ASCII range only.
- Anything above 127 depends on the encoding. Check it before you assume a meaning.
Creator of TextArray — building free, privacy-first tools that run entirely in your browser.