ASCII Table

Every ASCII character from 0 to 127 with its decimal, hexadecimal, binary, octal and HTML entity representation — filterable, and with the control characters explained.

Updated: 2 August 2026Read: 9 minRuns: 100% in your browser

Control characters (0–31 and 127)

The first 32 codes and code 127 are non-printing control characters. They were designed for teleprinters and serial terminals: ring the bell, advance the paper, return the carriage. Most are historical curiosities today, but a handful remain essential.

DecHexBinaryOctalCharHTMLDescription
00x00000000000o000NUL�Null
10x01000000010o001SOHStart of heading
20x02000000100o002STXStart of text
30x03000000110o003ETXEnd of text
40x04000001000o004EOTEnd of transmission
50x05000001010o005ENQEnquiry
60x06000001100o006ACKAcknowledge
70x07000001110o007BELBell / alert
80x08000010000o010BSBackspace
90x09000010010o011HT	Horizontal tab
100x0A000010100o012LF
Line feed
110x0B000010110o013VTVertical tab
120x0C000011000o014FFForm feed
130x0D000011010o015CR
Carriage return
140x0E000011100o016SOShift out
150x0F000011110o017SIShift in
160x10000100000o020DLEData link escape
170x11000100010o021DC1Device control 1
180x12000100100o022DC2Device control 2
190x13000100110o023DC3Device control 3
200x14000101000o024DC4Device control 4
210x15000101010o025NAKNegative acknowledge
220x16000101100o026SYNSynchronous idle
230x17000101110o027ETBEnd of transmission block
240x18000110000o030CANCancel
250x19000110010o031EMEnd of medium
260x1A000110100o032SUBSubstitute
270x1B000110110o033ESCEscape
280x1C000111000o034FSFile separator
290x1D000111010o035GSGroup separator
300x1E000111100o036RSRecord separator
310x1F000111110o037USUnit separator
1270x7F011111110o177DELDelete

The ones that still matter

  • 9 (HT) — tab, still used for indentation and TSV files.
  • 10 (LF) — line feed, the newline on Unix, macOS and inside HTTP and most network protocols.
  • 13 (CR) — carriage return. Windows uses CR+LF, which is why files moved between systems show stray ^M characters or collapse into a single line.
  • 27 (ESC) — starts every ANSI escape sequence, which is how terminals do colour and cursor movement.
  • 0 (NUL) — the string terminator in C. Injecting it into text handled by C libraries is a classic truncation attack.
  • 7 (BEL) — still makes most terminals beep.

Printable characters (32–126)

These 95 characters are the ones you can type and see. Every keyboard, font and protocol supports them, which is why they form the safe common denominator for identifiers, URLs and file formats.

DecHexBinaryOctalCharHTMLDescription
320x20001000000o040SP Space
330x21001000010o041!!Exclamation mark
340x22001000100o042""Double quote
350x23001000110o043##Number sign / hash
360x24001001000o044$$Dollar sign
370x25001001010o045%%Percent sign
380x26001001100o046&&Ampersand
390x27001001110o047''Apostrophe
400x28001010000o050((Left parenthesis
410x29001010010o051))Right parenthesis
420x2A001010100o052**Asterisk
430x2B001010110o053++Plus sign
440x2C001011000o054,,Comma
450x2D001011010o055--Hyphen-minus
460x2E001011100o056..Full stop
470x2F001011110o057//Solidus / slash
480x30001100000o06000Digit 0
490x31001100010o06111Digit 1
500x32001100100o06222Digit 2
510x33001100110o06333Digit 3
520x34001101000o06444Digit 4
530x35001101010o06555Digit 5
540x36001101100o06666Digit 6
550x37001101110o06777Digit 7
560x38001110000o07088Digit 8
570x39001110010o07199Digit 9
580x3A001110100o072::Colon
590x3B001110110o073;&#59;Semicolon
600x3C001111000o074<&lt;Less-than sign
610x3D001111010o075=&#61;Equals sign
620x3E001111100o076>&gt;Greater-than sign
630x3F001111110o077?&#63;Question mark
640x40010000000o100@&#64;Commercial at
650x41010000010o101A&#65;Uppercase A
660x42010000100o102B&#66;Uppercase B
670x43010000110o103C&#67;Uppercase C
680x44010001000o104D&#68;Uppercase D
690x45010001010o105E&#69;Uppercase E
700x46010001100o106F&#70;Uppercase F
710x47010001110o107G&#71;Uppercase G
720x48010010000o110H&#72;Uppercase H
730x49010010010o111I&#73;Uppercase I
740x4A010010100o112J&#74;Uppercase J
750x4B010010110o113K&#75;Uppercase K
760x4C010011000o114L&#76;Uppercase L
770x4D010011010o115M&#77;Uppercase M
780x4E010011100o116N&#78;Uppercase N
790x4F010011110o117O&#79;Uppercase O
800x50010100000o120P&#80;Uppercase P
810x51010100010o121Q&#81;Uppercase Q
820x52010100100o122R&#82;Uppercase R
830x53010100110o123S&#83;Uppercase S
840x54010101000o124T&#84;Uppercase T
850x55010101010o125U&#85;Uppercase U
860x56010101100o126V&#86;Uppercase V
870x57010101110o127W&#87;Uppercase W
880x58010110000o130X&#88;Uppercase X
890x59010110010o131Y&#89;Uppercase Y
900x5A010110100o132Z&#90;Uppercase Z
910x5B010110110o133[&#91;Left square bracket
920x5C010111000o134\&#92;Reverse solidus / backslash
930x5D010111010o135]&#93;Right square bracket
940x5E010111100o136^&#94;Circumflex accent
950x5F010111110o137_&#95;Low line / underscore
960x60011000000o140`&#96;Grave accent
970x61011000010o141a&#97;Lowercase a
980x62011000100o142b&#98;Lowercase b
990x63011000110o143c&#99;Lowercase c
1000x64011001000o144d&#100;Lowercase d
1010x65011001010o145e&#101;Lowercase e
1020x66011001100o146f&#102;Lowercase f
1030x67011001110o147g&#103;Lowercase g
1040x68011010000o150h&#104;Lowercase h
1050x69011010010o151i&#105;Lowercase i
1060x6A011010100o152j&#106;Lowercase j
1070x6B011010110o153k&#107;Lowercase k
1080x6C011011000o154l&#108;Lowercase l
1090x6D011011010o155m&#109;Lowercase m
1100x6E011011100o156n&#110;Lowercase n
1110x6F011011110o157o&#111;Lowercase o
1120x70011100000o160p&#112;Lowercase p
1130x71011100010o161q&#113;Lowercase q
1140x72011100100o162r&#114;Lowercase r
1150x73011100110o163s&#115;Lowercase s
1160x74011101000o164t&#116;Lowercase t
1170x75011101010o165u&#117;Lowercase u
1180x76011101100o166v&#118;Lowercase v
1190x77011101110o167w&#119;Lowercase w
1200x78011110000o170x&#120;Lowercase x
1210x79011110010o171y&#121;Lowercase y
1220x7A011110100o172z&#122;Lowercase z
1230x7B011110110o173{&#123;Left curly brace
1240x7C011111000o174|&#124;Vertical line / pipe
1250x7D011111010o175}&#125;Right curly brace
1260x7E011111100o176~&#126;Tilde

Patterns worth memorising

The ASCII layout is not arbitrary. Several deliberate design choices make character manipulation cheap in code:

  • Digits start at 48. '7' - '0' gives the numeric value 7. This is why char - 48 appears in so much parsing code.
  • Case differs by exactly 32. Uppercase A is 65, lowercase a is 97. Since 32 is 25, flipping bit 5 toggles case: c ^ 32. c | 32 forces lowercase and c & ~32 forces uppercase.
  • Letters are contiguous. A–Z run 65–90 and a–z run 97–122 with no gaps, so range checks work. EBCDIC, the IBM alternative, did not have this property and was far more painful to program against.
  • Control characters come first. Any byte under 32 is non-printing, so a single comparison filters them.

Apply these to real text with the text to binary converter, which shows the code point, binary and byte values of every character you type.

A short history

ASCII — the American Standard Code for Information Interchange — was published by the American Standards Association in 1963 and revised in 1967 and 1986. Before it, every manufacturer used its own encoding, and moving data between an IBM machine and anything else required a translation table.

The committee chose 7 bits, giving 128 codes. Seven was a compromise: six bits could not fit both cases plus digits and punctuation, and eight would have wasted expensive memory and transmission time. The eighth bit was commonly used as a parity check on serial lines.

That decision echoes today. UTF-8 was designed so that the 128 ASCII codes encode as single bytes with identical values, which means every ASCII file is already a valid UTF-8 file. Sixty years on, the table below is still the foundation of Unicode and therefore of essentially all digital text.

Extended ASCII and why it is ambiguous

“Extended ASCII” refers to codes 128–255, and the phrase is misleading because there is no single extended ASCII. Dozens of incompatible extensions filled that range:

EncodingCoversNotes
ISO-8859-1 (Latin-1)Western EuropeanThe historical default for HTTP and early HTML
Windows-1252Western EuropeanLatin-1 plus curly quotes and the euro sign in 128–159
ISO-8859-2Central EuropeanPolish, Czech, Hungarian
ISO-8859-5CyrillicRussian, Bulgarian, Serbian
KOI8-RCyrillicOrdered so that stripping bit 7 leaves readable transliteration
Code page 437IBM PCBox-drawing characters used for text-mode interfaces

The same byte meant different characters in each, which is the root cause of mojibake — text turned to garbage by being decoded with the wrong table. Unicode and UTF-8 exist to end this, and a page that declares <meta charset="utf-8"> never has the problem. Our character encoding guide traces the whole story.

Frequently Asked Questions

What is the ASCII value of A?

Uppercase A is 65 (0x41, binary 01000001). Lowercase a is 97 (0x61, binary 01100001).

How many characters are in ASCII?

128, numbered 0 to 127. Of those, 95 are printable and 33 are control characters (0–31 plus 127).

Why is ASCII 7-bit?

It was a compromise between coverage and cost. Six bits could not fit both letter cases plus digits and punctuation; eight would have wasted memory and bandwidth. The eighth bit was often used for parity.

What is the difference between ASCII and UTF-8?

UTF-8 is a superset. The 128 ASCII characters encode identically as single bytes, so every ASCII file is valid UTF-8, but UTF-8 continues with 2 to 4 byte sequences to cover all of Unicode.

How do I convert an ASCII code to a character?

In JavaScript String.fromCharCode(65), in Python chr(65), in C just cast the integer. Reverse with charCodeAt() or ord().

What is extended ASCII?

An informal name for codes 128–255, which ASCII never defined. Many incompatible encodings filled that range, which is why the same byte can render as different characters in different systems.

Why does uppercase differ from lowercase by 32?

It was a deliberate design choice. 32 is 2⁵, so a single bit distinguishes case and toggling it converts between them — a meaningful optimisation in 1963 hardware.

Sources & further reading

  1. Unicode: C0 Controls and Basic Latin — the official chart for code points U+0000 to U+007F
  2. RFC 20 — ASCII as adopted for use in network interchange, 1969
  3. Wikipedia: ASCII — committee history and the 1963/1967/1986 revisions
  4. Wikipedia: Mojibake — what happens when the wrong extended-ASCII table is applied