ASCII and Character Encoding Basics

How ASCII codes work and how they relate to Unicode and UTF-8.

ASCII assigns numeric codes to 128 characters (0–127). Extended ASCII and Unicode expanded this to support international characters. UTF-8 encodes Unicode using variable-length byte sequences.

Common ASCII codes

  • A = 65, a = 97
  • 0 = 48
  • Space = 32
  • Newline (LF) = 10
  • Tab = 9
Convert characters to ASCII