ASCII Table Reference

The basic Latin letters, digits and punctuation defined by seven-bit ASCII map to values between 32 and 126. Values below 32 and the value 127 are control codes, LF, CR, ESC, DEL and others that still matter when debugging protocols or fixing line endings. This reference lists every ASCII value from 0 to 127 with its standard mnemonic or character name, decimal, hexadecimal, octal, binary and HTML numeric-reference notation.

How to use the ASCII table

  1. 1

    Find the value you need

    Filter by a character, decimal value, hex value, standard name or control-code mnemonic such as LF or ESC.

  2. 2

    Read across the row

    Compare decimal, hexadecimal, octal, eight-bit binary display and HTML decimal or hexadecimal numeric-reference notation.

  3. 3

    Copy a value

    Select any numeric or character cell to copy it, or use the three-step view to open one row and copy the exact representation you need.

The three ranges of ASCII

Range Decimal Contents
Control 0-31, 127 NUL, BEL, BS, HT, LF, VT, FF, CR, ESC, DEL, others
Printable 32-126 Space, punctuation, digits, A-Z, a-z
Extended (non-ASCII) 128+ Depends on encoding; ASCII strictly stops at 127

Control codes that still matter

  • 0x00 NUL, String terminator in C, padding in some binary formats.
  • 0x07 BEL, Ring the terminal bell.
  • 0x08 BS, Backspace.
  • 0x09 HT, Horizontal tab.
  • 0x0A LF, Line feed, the Unix newline.
  • 0x0D CR, Carriage return; pairs with LF on Windows for CRLF.
  • 0x1B ESC, Starts ANSI escape sequences for terminal colours.
  • 0x7F DEL, Originally the code to punch out a tape hole; now rarely used.

ASCII vs Unicode

Unicode preserves the first 128 code points with the same meanings as ASCII. UTF-8 also encodes those values as the same single bytes, so a UTF-8 file containing only ASCII characters is byte-for-byte identical to its ASCII representation. This compatibility does not mean that every character encoding uses ASCII byte values; EBCDIC is a well-known counterexample.

Common conversions

  • Decimal to hex: 65 (dec) = 0x41 = A
  • Hex to binary: 0x41 = 0100 0001
  • Hex to HTML entity: A or A both render as A

The table shows numeric-reference notation for every ASCII value so you can compare the numbers consistently. Many ASCII control values are not valid or useful as visible HTML text, and browsers can replace or ignore them; do not expect a control reference such as � to render as the original byte.

Frequently Asked Questions

ASCII is a 7-bit code, leaving the eighth bit of a byte free for parity or extension. Values 128-255 are the realm of “extended ASCII” variants (Latin-1, Windows-1252, MacRoman, etc.), all incompatible with each other, which is part of why Unicode won.

LF (0x0A) moves down one line; CR (0x0D) moves the cursor back to column zero. On Unix a newline is LF alone; on classic Mac it was CR alone; on Windows and HTTP headers it is CR followed by LF (CRLF). Mismatches are the classic cause of double-spaced or run-together text between systems.

ASCII uppercase letters occupy 65-90 and lowercase letters occupy 97-122, exactly 0x20 apart. After first verifying that a byte is an ASCII letter, code can set, clear or toggle the 0x20 bit to change case. Applying XOR 0x20 blindly to arbitrary bytes is unsafe because it also changes digits, punctuation and control values.

Yes: LF and CR in text files, HT and FF in source code and terminals, ESC in ANSI colour sequences, BEL in terminal bells and alerts. NUL still terminates C strings. The rest are mostly legacy from teletype days.

Related Tools