ASCII Table

Character—
Decimal—
Hexadecimal—
Binary—
HTML entity—
Name—

How ASCII Table is calculated: ASCII code = the number for a character. A = 65 = 0x41 = 01000001 in binary = A in HTML.

What is an ASCII table?

An ASCII table lists the 128 codes that computers use for plain English text — every letter, digit, punctuation mark, and control signal, each with its own number from 0 to 127. The letter A is 65. The digit 0 is 48. A space is 32. Type a character into this page and it shows the decimal, hexadecimal, binary, and HTML codes for it, plus its name.

The need comes up every time a developer works with text at the level of numbers. A program reads a key press as a code, not a letter. A file format stores a newline as code 10. A web page shows an ampersand as &. Knowing the number behind the character is how you debug text, build parsers, and fix encoding problems that look like gibberish on screen.

This table covers all 128 codes: the 33 control codes from 0 to 31, the 95 printable characters from 32 to 126, and code 127, Delete. Type a character, or type a code, and every form of it appears instantly. Everything runs in your browser — nothing is stored, and there is no account to create. An ASCII converter turns whole words into codes, while this table is the reference for one character at a time.

How an ASCII table works

Every character has one number, and every number has four common spellings. Take the letter A. Its decimal code is 65. Its hexadecimal code is 0x41, because 65 in base 16 is 41. Its binary code is 01000001, which is 64 plus 1. Its HTML entity is A, which is how you write an A in a web page when you need the code rather than the letter.

The codes are grouped by meaning. Codes 0 to 31 are control characters — signals like 10 for line feed, 13 for carriage return, 9 for tab, and 27 for escape — which do things instead of printing. Code 32 is the space. Codes 48 to 57 are the digits 0 to 9, in order. Codes 65 to 90 are the capital letters A to Z, in order, and codes 97 to 122 are the small letters a to z, in order.

The order is not an accident. A capital letter and its small version are exactly 32 apart — A is 65 and a is 97 — which is why flipping one bit converts case in old code. A digit's code minus 48 is the digit itself — 0 is 48, 5 is 53 — which is how programs turn typed digits into numbers. The table is a numbering system with the arithmetic built in.

The printable range, in one compact reference

The printable characters run from 32 to 126, and they fall into neat groups. Code 32 is the space. Codes 33 to 47 are punctuation: ! " # $ % & ' ( ) * + , - . / — the exclamation mark at 33, the hash at 35, the ampersand at 38, the full stop at 46, and the slash at 47.

Codes 48 to 57 are the digits 0 to 9, in order, so 0 is 48 and 9 is 57. Codes 58 to 64 are punctuation again: : ; < = > ? @ — the colon at 58 and the at sign at 64. Codes 65 to 90 are the capital letters A to Z, so A is 65 and Z is 90. Codes 91 to 96 are [ \ ] ^ _ ` — the brackets, the backslash, and the underscore at 95.

Codes 97 to 122 are the small letters a to z, so a is 97 and z is 122. Codes 123 to 126 are { | } ~ — the curly brackets, the vertical bar, and the tilde. That is all 95 printable characters: 32 space, 33 to 47 punctuation, 48 to 57 digits, 58 to 64 punctuation, 65 to 90 capitals, 91 to 96 punctuation, 97 to 122 lowercase, and 123 to 126 punctuation. A character counter can check how many of them are in a piece of text.

A worked example: three characters, three codes

Here is a real comparison, using the exact outputs this page shows. First, the default character: A. Its decimal code is 65, its hex is 0x41, its binary is 01000001, its HTML entity is A, and its name is Capital letter A. Five spellings of the same character, all from one number.

Second, the small letter a, looked up by code: type 97 into the code box, with the character box empty, and you get a, decimal 97, hex 0x61, binary 01100001, HTML entity a, and the name Small letter a. Compare the binary with A's 01000001 — only the second bit differs, which is the 32 that separates capitals from small letters.

Third, the space, code 32: decimal 32, hex 0x20, binary 00100000, HTML entity , and the name Space. The character itself shows as a blank, which is honest — a space is invisible — and the other five rows are what tell you it is there. Three characters, three full code cards, and not one of them needed a book.

Who uses an ASCII table, and why

Programmers are the biggest users. Every language has functions that turn characters into codes and codes into characters, and the table is the reference they check against. Debugging a file that shows strange symbols starts with looking up the codes; building a parser starts with knowing which codes are digits and which are letters.

Web developers are the second group. HTML entities like & for & and < for < are how you show a character that would otherwise be read as code. A hex encoder turns whole strings into hexadecimal the same way this table turns one character into hex, and a base64 encoder decoder carries text safely through systems that only accept ASCII.

Students are the third group. ASCII is the first encoding most courses teach, because it is small enough to learn — 128 codes — and it explains how text works inside a machine. The table on this page handles all three uses — look up a character, look up a code, learn the groups — which covers ninety percent of what anyone needs.

Hardware and protocol engineers are a fourth group, and they use the control codes daily. A serial device expects a carriage return at 13 and a line feed at 10; a terminal answers to escape at 27. The control names on this page — NUL, BEL, ESC, DEL — are the vocabulary of that work.

ASCII table vs ASCII converter

An ASCII table and an ASCII converter both deal in character codes, but they answer different questions. A table answers: what is the code for this one character, in every spelling, and what is it called? A converter answers: what are the codes for this whole string, one after another? One is a reference; the other is a batch job.

The difference matters for workflow. Use the table when you are learning, debugging, or checking one character — what is the code for @, what is code 27 called, is ~ printable. Use a converter when you have a word or a sentence to encode and you want the whole list at once. The table teaches the system; the converter applies it.

Either way, the numbers are the same. A is 65 in the table and 65 in the converter, because there is only one ASCII. And a character counter answers the question both tools leave open: how many characters are in the text you are encoding.

Common ASCII mistakes

The most common mistake is thinking ASCII covers every language. It does not — it covers English letters, digits, and punctuation, and nothing else. An é, a €, or a 中 is not in ASCII at all, and a system that only speaks ASCII will show a question mark or a box instead. For those characters you need Unicode, which extends ASCII rather than replacing it.

Second: confusing hex and decimal. 0x41 is 65, not 41 — the 0x prefix means base 16, and 41 in hex is 65 in decimal. Reading a hex code as a decimal number is the most common off-by-some error in debugging, and the table shows both spellings side by side so you can check.

Third: forgetting that control characters are invisible. Code 10 is a line feed — it moves the cursor down, it does not print anything. Code 0 is null — it prints nothing at all. A file that looks empty can hold control codes, and a string that looks short can hold them too. When text behaves strangely, look at the codes, not the screen.

Fourth: typing more than one character and expecting a list. This table reads the first character you type and ignores the rest. Paste AB and you get A, not A and B. For a whole word, use a converter; for one character, use this table.

How to use this ASCII table

Using this ASCII table is simple. Type one character into the character box — A is the default — and its decimal, hex, binary, and HTML codes appear instantly, with its name. Or clear the character box, type a code from 0 to 127 into the code box, and the character appears instead.

To look up another character, select all, delete, and type the new one — the codes update live. If the character box is empty and the code box is empty, every row shows a dash, because there is nothing to look up. If you type a character outside ASCII, like €, the table still shows its decimal, hex, binary, and HTML forms, but its name shows a dash, because it has no ASCII name.

Everything runs in your browser. No sign-up, no account, no data sent anywhere. It works offline once the page has loaded, so you can use it on a plane, in a classroom with no signal, or anywhere else you work with text. Try it with something real before you need it: look up the @ in your email address, or the code 10 that ends every line of a file. Once you have used it twice, the groups — digits at 48, capitals at 65, small letters at 97 — will start to stick.

Frequently Asked Questions

ASCII is a 128-code system for plain English text, with one number from 0 to 127 for each character. A is 65, a is 97, 0 is 48, and a space is 32. Codes 0 to 31 are control signals, codes 32 to 126 are printable characters, and code 127 is Delete. ASCII is the base that Unicode extends — the first 128 Unicode codes are ASCII.

65 in decimal, 0x41 in hexadecimal, 01000001 in binary, and A as an HTML entity. Its name is Capital letter A. The small letter a is 97, 0x61, 01100001, and a — exactly 32 more, which is the gap between capitals and small letters throughout ASCII.

128 codes, from 0 to 127. Of those, 95 are printable — codes 32 to 126, covering the space, digits, letters, and punctuation — and 33 are control characters, codes 0 to 31 plus code 127, which do things like line feed and escape instead of printing. ASCII covers English only; accented letters and other scripts need Unicode.

They are three spellings of the same number. Decimal is base 10, the everyday system: A is 65. Hexadecimal is base 16, the programmer's shorthand: A is 0x41. Binary is base 2, the machine's own system: A is 01000001. 65, 0x41, and 01000001 are the same value written three ways.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.