Skip to content
uencoder

ASCII

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard that defines 128 characters (0-127), covering English letters, digits, punctuation, and control characters.

Purpose

It provided early computers and communication equipment with a unified character standard so that text could be interchanged between devices from different vendors.

Mechanism

Each character is represented in 7 bits, usually stored in 1 byte (the high-order bit is 0 or used for parity). Codes 0-31 and 127 are control characters; 32-126 are printable. Modern encodings such as UTF-8 are supersets of ASCII.

Use cases

  • Protocol keywords and HTTP headers
  • Default character set for source code and configuration files
  • Serial and embedded communication
  • Domain name labels in DNS records

Examples

  • Input
    A
    Output
    65

    The ASCII code of uppercase A is 65

Common errors

Mistaking extended ASCII (128-255) for standard ASCII
Standardize on UTF-8 encoding

Related terms

Related tools

References