ASCII Table
Full ASCII reference 0–127 with decimal, hex, binary, character, and HTML entity. Filterable.
The 128 characters
ASCII (American Standard Code for Information Interchange) is the 128-character encoding standard that maps characters 0–127 to integers. It's the foundation of every modern text encoding — UTF-8, Latin-1, Windows-1252 all extend it — so understanding ASCII values becomes essential when debugging binary data, writing parsers, or investigating text corruption.
Hex dumps, parsers, and invisible bytes
- Reading a hex dump and translating byte sequences back to readable characters or control codes.
- Writing a parser and needing exact boundary values:
0x20(space) marks the start of printable ASCII,0x7E(tilde) marks the end. - Debugging corrupted or malformed data — a CSV import failed because a field contained
0x09(Tab) or0x1F(Unit Separator), breaking your delimiter logic. - Converting characters to HTML entities: you know
Arenders asA, but need to verify the decimal value quickly. - Resolving platform differences: confirming whether your regex should match
\r(0x0D, Carriage Return) or\n(0x0A, Line Feed) or both. - Inspecting control characters in logs or network traffic — identifying whether that invisible character is BEL (0x07), ESC (0x1B), or something else entirely.
Filtering and reading the table
- Enter a search term (decimal, hex, character, or description) into the filter box and the table updates instantly.
- View all 128 ASCII codes at once with decimal, hexadecimal, octal, and binary representations side by side.
- Click or copy any row to see HTML entity codes for characters that need escaping in markup.
- Control characters (0x00–0x1F and 0x7F) show human-readable descriptions so you know what BEL, ESC, or NUL actually do.
Pitfalls in the encoding boundary
- ASCII is strictly 7-bit. Byte values 128–255 are not ASCII — they belong to whatever 8-bit encoding the document declares (Latin-1, CP-1252, Shift-JIS) or form the lead bytes of a UTF-8 multi-byte sequence. Don't assume a byte outside 0–127 is ASCII.
- Newlines are platform-dependent. Unix and macOS use LF alone (0x0A); legacy Mac Classic used CR only (0x0D); Windows uses CRLF (both). Code that assumes one format will miscount lines or fail to parse files from other platforms.
- Control characters hide silently. Copy-pasting from a terminal, PDF, or rich-text editor can introduce invisible characters like 0x1F (Unit Separator), 0x07 (BEL), or zero-width Unicode that aren't ASCII at all. If text looks identical but fails equality checks, always dump the bytes.
- HTML entities are context-dependent. In UTF-8 documents,
Aand a literalAare equivalent. Only escape the five characters that hold syntactic meaning in HTML:&,<,>,", and'. - NUL (0x00) terminates C strings. Many C APIs and legacy systems treat NUL as an end-of-string marker. Embedding NUL in a buffer without explicit length handling causes silent truncation.
Printable vs control ranges
- Codes 0x00–0x1F and 0x7F are control characters — most are invisible and often have no printable representation.
- Codes 0x20–0x7E (space through tilde) are the printable ASCII range.
- The high bit (0x80) is not part of standard ASCII and marks the boundary where extended encodings diverge.
Tracing a broken CSV import
A CSV import keeps breaking on one row. The table shows the offending field held 0x09 (Tab) or 0x1F (Unit Separator) — invisible control codes colliding with your delimiter logic. Now you know exactly which byte to strip, instead of guessing at "corrupted data".
Questions about the table
Does it cover "extended ASCII" (128–255)? No — true ASCII is 0–127. Bytes above that belong to encodings like Latin-1 or UTF-8, which extend ASCII in different ways; use the unicode-inspector for those.
Which characters are printable? 0x20 (space) through 0x7E (tilde). Everything below 0x20, plus 0x7F, are control codes.
Why would I need the control characters? Codes like 0x0D (carriage return), 0x0A (line feed), and 0x09 (tab) are invisible but cause real bugs — CRLF-vs-LF line endings, tab-vs-space delimiters, and the like.
Can I see a value in hex, decimal, and binary? Yes — each character lists its decimal, hex, binary, and HTML entity, so you can cross-reference a hex dump directly.
Control codes vs printable (0–31 and 127) that print as nothing
The printable half of ASCII is the easy part; the bugs live in the low 32 plus DEL, which have no glyph and travel invisibly inside “clean” text. These are the ones you actually meet:
| Dec | Hex | Name | Escape | What it does |
|---|---|---|---|---|
| 0 | 0x00 | NUL | |