ASCII Table
ASCII has 128 codes, numbered 0 to 127: 33 control characters and 95 printable ones (the space and 94 visible characters). Type a character, a number or a name such as tab to see its decimal, hex, octal and binary value, its control name and its HTML reference. The example, A (decimal 65), is hex 41, octal 101 and binary 01000001, in the uppercase letters group. Everything runs in your browser and nothing you type is sent anywhere.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
Read as character: A is decimal 65.
A (decimal 65)
- Decimal
- 65
- Hexadecimal
- 0x41
- Octal
- 101
- Binary
- 01000001
- Character
- A
- Name
- Latin capital letter A
- Group
- Uppercase letters
- Caret notation
- none
- C escape
- none
- HTML entity
- none
- HTML numeric reference
- A or A
A printable uppercase letter character.
A valid character reference.
All 128 ASCII codes
Control characters show their abbreviation; SP is the space. Binary is shown as a byte.
Showing all 128 codes.
| Dec | Hex | Oct | Binary | Char | Name | Caret | HTML |
|---|---|---|---|---|---|---|---|
| 0 | 00 | 000 | 00000000 | NUL | Null | ^@ | � (not allowed) |
| 1 | 01 | 001 | 00000001 | SOH | Start of Heading | ^A |  (not allowed) |
| 2 | 02 | 002 | 00000010 | STX | Start of Text | ^B |  (not allowed) |
| 3 | 03 | 003 | 00000011 | ETX | End of Text | ^C |  (not allowed) |
| 4 | 04 | 004 | 00000100 | EOT | End of Transmission | ^D |  (not allowed) |
| 5 | 05 | 005 | 00000101 | ENQ | Enquiry | ^E |  (not allowed) |
| 6 | 06 | 006 | 00000110 | ACK | Acknowledge | ^F |  (not allowed) |
| 7 | 07 | 007 | 00000111 | BEL | Bell | ^G |  (not allowed) |
| 8 | 08 | 010 | 00001000 | BS | Backspace | ^H |  (not allowed) |
| 9 | 09 | 011 | 00001001 | HT | Horizontal Tabulation | ^I | 	 |
| 10 | 0A | 012 | 00001010 | LF | Line Feed | ^J | |
| 11 | 0B | 013 | 00001011 | VT | Vertical Tabulation | ^K |  (not allowed) |
| 12 | 0C | 014 | 00001100 | FF | Form Feed | ^L |  |
| 13 | 0D | 015 | 00001101 | CR | Carriage Return | ^M | |
| 14 | 0E | 016 | 00001110 | SO | Shift Out | ^N |  (not allowed) |
| 15 | 0F | 017 | 00001111 | SI | Shift In | ^O |  (not allowed) |
| 16 | 10 | 020 | 00010000 | DLE | Data Link Escape | ^P |  (not allowed) |
| 17 | 11 | 021 | 00010001 | DC1 | Device Control 1 | ^Q |  (not allowed) |
| 18 | 12 | 022 | 00010010 | DC2 | Device Control 2 | ^R |  (not allowed) |
| 19 | 13 | 023 | 00010011 | DC3 | Device Control 3 | ^S |  (not allowed) |
| 20 | 14 | 024 | 00010100 | DC4 | Device Control 4 | ^T |  (not allowed) |
| 21 | 15 | 025 | 00010101 | NAK | Negative Acknowledge | ^U |  (not allowed) |
| 22 | 16 | 026 | 00010110 | SYN | Synchronous Idle | ^V |  (not allowed) |
| 23 | 17 | 027 | 00010111 | ETB | End of Transmission Block | ^W |  (not allowed) |
| 24 | 18 | 030 | 00011000 | CAN | Cancel | ^X |  (not allowed) |
| 25 | 19 | 031 | 00011001 | EM | End of Medium | ^Y |  (not allowed) |
| 26 | 1A | 032 | 00011010 | SUB | Substitute | ^Z |  (not allowed) |
| 27 | 1B | 033 | 00011011 | ESC | Escape | ^[ |  (not allowed) |
| 28 | 1C | 034 | 00011100 | FS | File Separator | ^\ |  (not allowed) |
| 29 | 1D | 035 | 00011101 | GS | Group Separator | ^] |  (not allowed) |
| 30 | 1E | 036 | 00011110 | RS | Record Separator | ^^ |  (not allowed) |
| 31 | 1F | 037 | 00011111 | US | Unit Separator | ^_ |  (not allowed) |
| 32 | 20 | 040 | 00100000 | SP | Space | – |   |
| 33 | 21 | 041 | 00100001 | ! | Exclamation mark | – | ! |
| 34 | 22 | 042 | 00100010 | " | Quotation mark | – | " or " |
| 35 | 23 | 043 | 00100011 | # | Number sign | – | # |
| 36 | 24 | 044 | 00100100 | $ | Dollar sign | – | $ |
| 37 | 25 | 045 | 00100101 | % | Percent sign | – | % |
| 38 | 26 | 046 | 00100110 | & | Ampersand | – | & or & |
| 39 | 27 | 047 | 00100111 | ' | Apostrophe | – | ' or ' |
| 40 | 28 | 050 | 00101000 | ( | Left parenthesis | – | ( |
| 41 | 29 | 051 | 00101001 | ) | Right parenthesis | – | ) |
| 42 | 2A | 052 | 00101010 | * | Asterisk | – | * |
| 43 | 2B | 053 | 00101011 | + | Plus sign | – | + |
| 44 | 2C | 054 | 00101100 | , | Comma | – | , |
| 45 | 2D | 055 | 00101101 | - | Hyphen-minus | – | - |
| 46 | 2E | 056 | 00101110 | . | Full stop | – | . |
| 47 | 2F | 057 | 00101111 | / | Solidus (slash) | – | / |
| 48 | 30 | 060 | 00110000 | 0 | Digit 0 | – | 0 |
| 49 | 31 | 061 | 00110001 | 1 | Digit 1 | – | 1 |
| 50 | 32 | 062 | 00110010 | 2 | Digit 2 | – | 2 |
| 51 | 33 | 063 | 00110011 | 3 | Digit 3 | – | 3 |
| 52 | 34 | 064 | 00110100 | 4 | Digit 4 | – | 4 |
| 53 | 35 | 065 | 00110101 | 5 | Digit 5 | – | 5 |
| 54 | 36 | 066 | 00110110 | 6 | Digit 6 | – | 6 |
| 55 | 37 | 067 | 00110111 | 7 | Digit 7 | – | 7 |
| 56 | 38 | 070 | 00111000 | 8 | Digit 8 | – | 8 |
| 57 | 39 | 071 | 00111001 | 9 | Digit 9 | – | 9 |
| 58 | 3A | 072 | 00111010 | : | Colon | – | : |
| 59 | 3B | 073 | 00111011 | ; | Semicolon | – | ; |
| 60 | 3C | 074 | 00111100 | < | Less-than sign | – | < or < |
| 61 | 3D | 075 | 00111101 | = | Equals sign | – | = |
| 62 | 3E | 076 | 00111110 | > | Greater-than sign | – | > or > |
| 63 | 3F | 077 | 00111111 | ? | Question mark | – | ? |
| 64 | 40 | 100 | 01000000 | @ | Commercial at | – | @ |
| 65 | 41 | 101 | 01000001 | A | Latin capital letter A | – | A |
| 66 | 42 | 102 | 01000010 | B | Latin capital letter B | – | B |
| 67 | 43 | 103 | 01000011 | C | Latin capital letter C | – | C |
| 68 | 44 | 104 | 01000100 | D | Latin capital letter D | – | D |
| 69 | 45 | 105 | 01000101 | E | Latin capital letter E | – | E |
| 70 | 46 | 106 | 01000110 | F | Latin capital letter F | – | F |
| 71 | 47 | 107 | 01000111 | G | Latin capital letter G | – | G |
| 72 | 48 | 110 | 01001000 | H | Latin capital letter H | – | H |
| 73 | 49 | 111 | 01001001 | I | Latin capital letter I | – | I |
| 74 | 4A | 112 | 01001010 | J | Latin capital letter J | – | J |
| 75 | 4B | 113 | 01001011 | K | Latin capital letter K | – | K |
| 76 | 4C | 114 | 01001100 | L | Latin capital letter L | – | L |
| 77 | 4D | 115 | 01001101 | M | Latin capital letter M | – | M |
| 78 | 4E | 116 | 01001110 | N | Latin capital letter N | – | N |
| 79 | 4F | 117 | 01001111 | O | Latin capital letter O | – | O |
| 80 | 50 | 120 | 01010000 | P | Latin capital letter P | – | P |
| 81 | 51 | 121 | 01010001 | Q | Latin capital letter Q | – | Q |
| 82 | 52 | 122 | 01010010 | R | Latin capital letter R | – | R |
| 83 | 53 | 123 | 01010011 | S | Latin capital letter S | – | S |
| 84 | 54 | 124 | 01010100 | T | Latin capital letter T | – | T |
| 85 | 55 | 125 | 01010101 | U | Latin capital letter U | – | U |
| 86 | 56 | 126 | 01010110 | V | Latin capital letter V | – | V |
| 87 | 57 | 127 | 01010111 | W | Latin capital letter W | – | W |
| 88 | 58 | 130 | 01011000 | X | Latin capital letter X | – | X |
| 89 | 59 | 131 | 01011001 | Y | Latin capital letter Y | – | Y |
| 90 | 5A | 132 | 01011010 | Z | Latin capital letter Z | – | Z |
| 91 | 5B | 133 | 01011011 | [ | Left square bracket | – | [ |
| 92 | 5C | 134 | 01011100 | \ | Reverse solidus (backslash) | – | \ |
| 93 | 5D | 135 | 01011101 | ] | Right square bracket | – | ] |
| 94 | 5E | 136 | 01011110 | ^ | Circumflex accent | – | ^ |
| 95 | 5F | 137 | 01011111 | _ | Low line (underscore) | – | _ |
| 96 | 60 | 140 | 01100000 | ` | Grave accent | – | ` |
| 97 | 61 | 141 | 01100001 | a | Latin small letter a | – | a |
| 98 | 62 | 142 | 01100010 | b | Latin small letter b | – | b |
| 99 | 63 | 143 | 01100011 | c | Latin small letter c | – | c |
| 100 | 64 | 144 | 01100100 | d | Latin small letter d | – | d |
| 101 | 65 | 145 | 01100101 | e | Latin small letter e | – | e |
| 102 | 66 | 146 | 01100110 | f | Latin small letter f | – | f |
| 103 | 67 | 147 | 01100111 | g | Latin small letter g | – | g |
| 104 | 68 | 150 | 01101000 | h | Latin small letter h | – | h |
| 105 | 69 | 151 | 01101001 | i | Latin small letter i | – | i |
| 106 | 6A | 152 | 01101010 | j | Latin small letter j | – | j |
| 107 | 6B | 153 | 01101011 | k | Latin small letter k | – | k |
| 108 | 6C | 154 | 01101100 | l | Latin small letter l | – | l |
| 109 | 6D | 155 | 01101101 | m | Latin small letter m | – | m |
| 110 | 6E | 156 | 01101110 | n | Latin small letter n | – | n |
| 111 | 6F | 157 | 01101111 | o | Latin small letter o | – | o |
| 112 | 70 | 160 | 01110000 | p | Latin small letter p | – | p |
| 113 | 71 | 161 | 01110001 | q | Latin small letter q | – | q |
| 114 | 72 | 162 | 01110010 | r | Latin small letter r | – | r |
| 115 | 73 | 163 | 01110011 | s | Latin small letter s | – | s |
| 116 | 74 | 164 | 01110100 | t | Latin small letter t | – | t |
| 117 | 75 | 165 | 01110101 | u | Latin small letter u | – | u |
| 118 | 76 | 166 | 01110110 | v | Latin small letter v | – | v |
| 119 | 77 | 167 | 01110111 | w | Latin small letter w | – | w |
| 120 | 78 | 170 | 01111000 | x | Latin small letter x | – | x |
| 121 | 79 | 171 | 01111001 | y | Latin small letter y | – | y |
| 122 | 7A | 172 | 01111010 | z | Latin small letter z | – | z |
| 123 | 7B | 173 | 01111011 | { | Left curly bracket | – | { |
| 124 | 7C | 174 | 01111100 | | | Vertical line | – | | |
| 125 | 7D | 175 | 01111101 | } | Right curly bracket | – | } |
| 126 | 7E | 176 | 01111110 | ~ | Tilde | – | ~ |
| 127 | 7F | 177 | 01111111 | DEL | Delete | ^? |  (not allowed) |
The five groups of ASCII
| Group | Decimal | Hex | Codes |
|---|---|---|---|
| Control characters | 0-31, 127 | 00-1F, 7F | 33 |
| Digits | 48-57 | 30-39 | 10 |
| Uppercase letters | 65-90 | 41-5A | 26 |
| Lowercase letters | 97-122 | 61-7A | 26 |
| Punctuation, symbols and space | 32-47, 58-64, 91-96, 123-126 | 20-2F, 3A-40, 5B-60, 7B-7E | 33 |
Control characters and their names
| Dec | Hex | Abbr. | Name | Caret | C escape | What it does |
|---|---|---|---|---|---|---|
| 0 | 00 | NUL | Null | ^@ | \0 | Does nothing. C uses it to end a string. |
| 1 | 01 | SOH | Start of Heading | ^A | – | Marked the start of a message header in a transmission. |
| 2 | 02 | STX | Start of Text | ^B | – | Marked the end of the header and the start of the text. |
| 3 | 03 | ETX | End of Text | ^C | – | Marked the end of the text. A terminal sends it for Ctrl+C, which usually interrupts a program. |
| 4 | 04 | EOT | End of Transmission | ^D | – | Ends a transmission. A Unix terminal sends it for Ctrl+D to signal end of input. |
| 5 | 05 | ENQ | Enquiry | ^E | – | Asked the remote station to identify itself. |
| 6 | 06 | ACK | Acknowledge | ^F | – | Positive reply in a transmission protocol. |
| 7 | 07 | BEL | Bell | ^G | \a | Sounds the terminal bell or beep. |
| 8 | 08 | BS | Backspace | ^H | \b | Moves the cursor one position back. |
| 9 | 09 | HT | Horizontal Tabulation | ^I | \t | Moves to the next tab stop. This is the Tab key. |
| 10 | 0A | LF | Line Feed | ^J | \n | Moves to the next line. It is the line ending on Unix, Linux and macOS. |
| 11 | 0B | VT | Vertical Tabulation | ^K | \v | Moves down to the next vertical tab stop. |
| 12 | 0C | FF | Form Feed | ^L | \f | Advances to the next page. |
| 13 | 0D | CR | Carriage Return | ^M | \r | Moves to the start of the line. CR followed by LF is the Windows and internet-protocol line ending. |
| 14 | 0E | SO | Shift Out | ^N | – | Switches to an alternate character set. |
| 15 | 0F | SI | Shift In | ^O | – | Switches back to the standard character set. |
| 16 | 10 | DLE | Data Link Escape | ^P | – | Changes the meaning of the characters that follow it in a protocol. |
| 17 | 11 | DC1 | Device Control 1 | ^Q | – | Also called XON: resume sending. Terminals send it for Ctrl+Q. |
| 18 | 12 | DC2 | Device Control 2 | ^R | – | Device control, with no fixed meaning. |
| 19 | 13 | DC3 | Device Control 3 | ^S | – | Also called XOFF: pause sending. Terminals send it for Ctrl+S. |
| 20 | 14 | DC4 | Device Control 4 | ^T | – | Device control, with no fixed meaning. |
| 21 | 15 | NAK | Negative Acknowledge | ^U | – | Negative reply in a transmission protocol. |
| 22 | 16 | SYN | Synchronous Idle | ^V | – | Kept a synchronous line in step when no data was being sent. |
| 23 | 17 | ETB | End of Transmission Block | ^W | – | Ended a block of data in a transmission. |
| 24 | 18 | CAN | Cancel | ^X | – | Marks the preceding data as in error and to be discarded. |
| 25 | 19 | EM | End of Medium | ^Y | – | Marked the physical end of a tape or other medium. |
| 26 | 1A | SUB | Substitute | ^Z | – | Stands in for a character found invalid. DOS and Windows consoles treat Ctrl+Z (SUB) as end of file. |
| 27 | 1B | ESC | Escape | ^[ | \e | Starts a terminal escape sequence, such as an ANSI colour code. The \e escape is a GCC and shell extension, not standard C. |
| 28 | 1C | FS | File Separator | ^\ | – | Separator between files in a data stream. |
| 29 | 1D | GS | Group Separator | ^] | – | Separator between groups. |
| 30 | 1E | RS | Record Separator | ^^ | – | Separator between records. |
| 31 | 1F | US | Unit Separator | ^_ | – | Separator between units (fields). |
| 127 | 7F | DEL | Delete | ^? | – | Originally punched every hole in paper tape to erase a character. Most protocols ignore it. |
ASCII characters with an HTML entity name
| Character | Entity | Decimal reference | Hex reference |
|---|---|---|---|
| " (Quotation mark) | " | " | " |
| & (Ampersand) | & | & | & |
| ' (Apostrophe) | ' | ' | ' |
| < (Less-than sign) | < | < | < |
| > (Greater-than sign) | > | > | > |
How to find an ASCII code
- Type what you know. Enter a character such as A, a number such as 65, 0x41 or 0b1000001, a caret form such as ^C, an escape such as \n, or a name such as tab, esc or line feed.
- Read the result card. It shows the code in decimal, hex, octal and binary, the character or control name, its group, caret notation, C escape and HTML references.
- Pick another reading. A lone digit such as 5 is both the character 5 and the number 5, and a word can match several names. Use the buttons under the result to switch.
- Browse the table. Use the group filter and the text box above the table to narrow all 128 rows to controls, digits, letters or punctuation.
Frequently asked questions
- How many characters are in the ASCII table?
- 128, with codes 0 to 127, which fit in 7 bits. 33 are control characters (0 to 31 and 127) and 95 are printable: the space, 10 digits, 26 uppercase letters, 26 lowercase letters and 32 punctuation marks and symbols.
- What is extended ASCII?
- There is no single extended ASCII. Bytes 128 to 255 were assigned by many different 8-bit code pages, such as ISO 8859-1 and Windows-1252, so the same byte shows a different character in each. This table covers standard ASCII only. Unicode keeps the first 128 code points identical to ASCII, and UTF-8 encodes each of them as the same single byte.
- Why do uppercase and lowercase letters differ by 32?
- Each lowercase letter is its uppercase letter plus 32: A is 65 (binary 01000001) and a is 97 (binary 01100001). Only one bit differs, the 0x20 bit, so software can change case by flipping it. Digits work in a similar way: 0 is 48 (hex 30), so a digit's value is its code minus 48.
- What is caret notation, such as ^C or ^@?
- Caret notation writes a control character as ^ followed by the character whose code is 64 higher: code 0 is ^@, code 1 is ^A, code 3 is ^C and code 27 is ^[. It matches holding Ctrl and pressing that key on a terminal, which clears the top bits of the key's code. DEL (127) is written ^? by convention.
- What is the difference between LF, CR and CRLF?
- LF (Line Feed, code 10, \n) moves down a line and CR (Carriage Return, code 13, \r) returns to the start of the line. Unix, Linux and macOS end lines with LF alone. Windows and many internet protocols, such as HTTP and SMTP headers, use CR followed by LF. Mixing them is a common cause of stray ^M characters in files.
- Why is the space character in the punctuation group?
- The space (code 32, hex 20) is the first printable code. RFC 20 treats it as a non-printing graphic rather than a control, because it advances the position like a character. This page lists it as SP in the punctuation group, and the control group holds only true controls.
- Which control characters do people still use?
- Mostly NUL (the end of a C string), HT (tab), LF and CR (line endings), ESC (terminal colour and cursor sequences), BEL (the terminal beep) and BS and DEL (deleting). ETX (Ctrl+C) and EOT (Ctrl+D) are still sent by Unix terminals. Most of the rest, such as SOH, STX and the separators, were made for teletype and tape protocols.
- Can I write a control character in HTML?
- Tab, line feed, form feed and carriage return are valid whitespace in HTML. The other control characters are parse errors even as numeric references such as , and � is replaced by the replacement character U+FFFD. Do not put them in web pages; use them in text files, terminals and protocols instead.
- Why does Unicode call HT “character tabulation”?
- The Unicode chart for the C0 controls gives some codes newer ISO 6429 names: HT is also CHARACTER TABULATION and VT is LINE TABULATION. The RFC 20 names used here, Horizontal Tabulation and Vertical Tabulation, describe the same codes, and the lookup box accepts both.
How it works
The table has 128 rows built in code. The 34 abbreviations, names, C escapes and one-line purposes of the control characters and space are written by hand from RFC 20 and the Unicode C0 controls chart; every other column is computed from the code. Decimal, hex, octal and binary come from the number itself (binary is shown as a byte, with a leading zero, although ASCII is a 7-bit code). Caret notation is the code plus 64 for 0 to 31, and ^? for 127. The group comes from the code range. HTML references are &#N; and &#xH; for every code, with a named entity only for 5 characters (", &, ', <, >). The lookup reads one character as itself; a number as decimal, or as hex, octal or binary with a 0x, 0o or 0b prefix, U+, \x, an h suffix, &#N; or &#xH;; ^X as caret notation; C escapes such as \n; an entity such as &; and any other text as a control name, abbreviation or alias (tab, newline, esc), listing every match when a word fits several. Numbers above 127 are reported as not ASCII. Nothing leaves your browser.
Sources
- RFC 20: ASCII format for Network Interchange (1969)
- ANSI X3.4-1986: Coded Character Set, 7-Bit American National Standard Code for Information Interchange (ASCII), as retained by ANSI
- Unicode Code Chart: C0 Controls and Basic Latin (U+0000 to U+007F)
- WHATWG HTML Standard: named character references
- WHATWG HTML Standard: numeric character reference end state (control characters)
- RFC 3629: UTF-8, a transformation format of ISO 10646
More free tools
- Unicode Character InspectorPaste text to see every character: graphemes, code points, UTF-8 and UTF-16, escapes, category, script, hidden characters and look-alike letters.
- Number Base ConverterConvert whole numbers between binary, octal, decimal, hex and any base from 2 to 36, up to 5,000 digits, with grouped digits and a two’s-complement view.
- Hex CalculatorAdd, subtract, multiply, divide and AND, OR, XOR, NOT or shift hex numbers of any size, with 8 to 64-bit overflow, two’s complement and long-hand working.
- Binary CalculatorAdd, subtract, multiply, divide, AND, OR, XOR, NOT and shift binary, hex, octal or decimal numbers, with overflow flags and two’s complement.
- Network Ports ReferenceSearch common TCP and UDP port numbers by number, range or service name: 22 SSH, 443 HTTPS, 3306 MySQL and more, with secure variants and IANA status.
- String Escape / UnescapeEscape or unescape text as a JSON, JavaScript, Java, Python, CSV, SQL, regex, shell or XML string, with a count of escapes and the position of any bad one.
More: Encoding and number systemsAll developer toolsAll toolsHome & DIY calculators