ASCII Table

Complete ASCII reference with decimal, hex, octal, binary, and HTML entity values. Click any row to copy the character.

CharDecHexOctBinaryHTMLName / DescriptionCategory
About this tool

ASCII Table

ASCII Table is a complete reference for all 128 ASCII characters with their decimal, hexadecimal, octal, binary and HTML entity values, filterable by control characters, printable characters, digits and letter case, with search.

How the table is arranged, and why it is arranged that way

ASCII is a 7-bit encoding, so it defines exactly 128 values. Codes 0 to 31 are control characters left over from teleprinters, 32 is the space, 48 to 57 are the digits, 65 to 90 are uppercase letters and 97 to 122 are lowercase.

The layout is deliberate. Uppercase and lowercase are exactly 32 apart, which is a single bit, so flipping bit 6 changes case. The digits start at 48, which is 0x30, so the numeric value of a digit character is its code minus 48. Both tricks are still used in code today.

Worked example

The case bit in practice:

  • A65 = 0x41
  • a97 = 0x61
  • Difference32, a single bit

Result: Changing case in ASCII is one bitwise operation, which is why the alphabet was placed where it was.

When it helps

  • Looking up a character code while debugging.
  • Finding the HTML entity for a character.
  • Understanding a hex dump or a byte stream.
  • Checking which control character a stray byte represents.

Common mistakes

  • Assuming ASCII covers everything. It defines 128 values and nothing else, which is why anything outside English needs Unicode.
  • Treating byte 127 as printable. It is DEL, a control character, despite sitting at the end of the printable range.
  • Confusing ASCII with Latin-1 or Windows-1252. Those extend it above 127 and disagree with each other.
ASCII Table interface preview
Screenshot of the live ASCII Table interface.