By Tim King · Updated
ASCII Table
Hex, Octal and Binary Values With HTML Entities, Downloadable as CSV or JSON
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the ASCII Table works
This ASCII table lists all 128 characters of the American Standard Code for Information Interchange with their decimal, hex, octal and binary codes. Printable characters show the glyph and its HTML entity; the 33 control codes show their standard abbreviation and full name. Search by character, number or name.
How the ASCII table is laid out
ASCII uses seven bits, so it has exactly 128 codes. Codes 0 to 31 and 127 are control characters, originally commands for teleprinters: line feed, carriage return, bell, escape. Code 32 is the space, and 33 to 126 are the 94 printable characters — digits, upper and lower case letters and punctuation. The binary column is padded to seven bits so the structure shows.
Patterns worth knowing
The layout is deliberate. Digits 0 to 9 are 48 to 57, so subtracting 48 gives the value. Upper-case letters start at 65 and lower-case at 97, exactly 32 apart, so flipping one bit changes the case. Control characters are the letters with the top bits cleared, which is why Ctrl+G rings the bell (7) and Ctrl+[ sends escape (27).
ASCII, Unicode and UTF-8
Unicode kept ASCII as its first 128 code points, and UTF-8 encodes those code points as the same single bytes. Any ASCII file is therefore already valid UTF-8. Characters above 127 — accented letters, curly quotes, emoji — are not ASCII, whatever an old code page says; use the Unicode inspector linked below for those.
FAQ
What is the difference between LF and CR?
Line feed (10) moves down a line and carriage return (13) moves back to the start of it, as they did on a typewriter. Unix and macOS end lines with LF alone, Windows with CR followed by LF, and old Mac OS used CR alone. Most editors now read all three.
Is extended ASCII part of this table?
No. So-called extended ASCII is any of several 8-bit code pages, such as Windows-1252 or ISO 8859-1, that disagree about codes 128 to 255. None of them is ASCII, which stops at 127. For those characters, work with Unicode code points instead of guessing a code page.
Can I use this ASCII table in my own work?
Yes. The table is generated from the ASCII standard and released under CC0, so it can go into documentation, a course or source code without asking. Download the CSV or JSON, and cite the line under the table if you want to credit it.
See also: all Tech Data tools, Everyday Data.
Related tools
Binary To Text Converter
Text to binary or ASCII codes and back again, UTF-8 aware.
Text To Hex Converter
Convert text to hexadecimal bytes and back again.
HTML Entity Encoder
Escape and unescape HTML entities in any text.
Hidden Character Inspector
Find the invisible characters breaking your text, then strip them.
Keycode Tester
Press a key and see exactly what your browser reports.