Skip to content

The ASCII table explained: 128 codes that still run the internet

Blog / Published 

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

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

Written by Ján Turský

Creator of TextArray — building free, privacy-first tools that run entirely in your browser.