Free ASCII Table (Dec, Hex, Octal, Binary)
A complete, searchable ASCII reference for codes 0β127, showing the decimal, hexadecimal, octal, and binary value of every character plus control-code names.
Examples: A, 65, 0x41, 0b01000001, LF, SPACE. For octal use the 0o prefix (e.g. 0o101). Clear the box to see all 128 codes.
Control codes (0β31)
Non-printing codes that signal actions β newlines, tabs, end-of-text, and terminal control. Shown with their mnemonic and C escape where one exists.
| Char | Dec | Hex | Oct | Binary | Description |
|---|---|---|---|---|---|
| NUL\0 | 0 | 00 | 000 | 00000000 | Null character |
| SOH | 1 | 01 | 001 | 00000001 | Start of heading |
| STX | 2 | 02 | 002 | 00000010 | Start of text |
| ETX | 3 | 03 | 003 | 00000011 | End of text |
| EOT | 4 | 04 | 004 | 00000100 | End of transmission |
| ENQ | 5 | 05 | 005 | 00000101 | Enquiry |
| ACK | 6 | 06 | 006 | 00000110 | Acknowledge |
| BEL\a | 7 | 07 | 007 | 00000111 | Bell / alert |
| BS\b | 8 | 08 | 010 | 00001000 | Backspace |
| HT\t | 9 | 09 | 011 | 00001001 | Horizontal tab |
| LF\n | 10 | 0A | 012 | 00001010 | Line feed (newline) |
| VT\v | 11 | 0B | 013 | 00001011 | Vertical tab |
| FF\f | 12 | 0C | 014 | 00001100 | Form feed (page break) |
| CR\r | 13 | 0D | 015 | 00001101 | Carriage return |
| SO | 14 | 0E | 016 | 00001110 | Shift out |
| SI | 15 | 0F | 017 | 00001111 | Shift in |
| DLE | 16 | 10 | 020 | 00010000 | Data link escape |
| DC1 | 17 | 11 | 021 | 00010001 | Device control 1 (XON) |
| DC2 | 18 | 12 | 022 | 00010010 | Device control 2 |
| DC3 | 19 | 13 | 023 | 00010011 | Device control 3 (XOFF) |
| DC4 | 20 | 14 | 024 | 00010100 | Device control 4 |
| NAK | 21 | 15 | 025 | 00010101 | Negative acknowledge |
| SYN | 22 | 16 | 026 | 00010110 | Synchronous idle |
| ETB | 23 | 17 | 027 | 00010111 | End of transmission block |
| CAN | 24 | 18 | 030 | 00011000 | Cancel |
| EM | 25 | 19 | 031 | 00011001 | End of medium |
| SUB | 26 | 1A | 032 | 00011010 | Substitute |
| ESC\e | 27 | 1B | 033 | 00011011 | Escape |
| FS | 28 | 1C | 034 | 00011100 | File separator |
| GS | 29 | 1D | 035 | 00011101 | Group separator |
| RS | 30 | 1E | 036 | 00011110 | Record separator |
| US | 31 | 1F | 037 | 00011111 | Unit separator |
Printable characters (32β126)
Space, digits, punctuation, and the Latin letters AβZ and aβz. These are the characters you actually see on screen.
| Char | Dec | Hex | Oct | Binary | Description |
|---|---|---|---|---|---|
| SPACE | 32 | 20 | 040 | 00100000 | Space |
| ! | 33 | 21 | 041 | 00100001 | Printable character β!β |
| " | 34 | 22 | 042 | 00100010 | Printable character β"β |
| # | 35 | 23 | 043 | 00100011 | Printable character β#β |
| $ | 36 | 24 | 044 | 00100100 | Printable character β$β |
| % | 37 | 25 | 045 | 00100101 | Printable character β%β |
| & | 38 | 26 | 046 | 00100110 | Printable character β&β |
| ' | 39 | 27 | 047 | 00100111 | Printable character β'β |
| ( | 40 | 28 | 050 | 00101000 | Printable character β(β |
| ) | 41 | 29 | 051 | 00101001 | Printable character β)β |
| * | 42 | 2A | 052 | 00101010 | Printable character β*β |
| + | 43 | 2B | 053 | 00101011 | Printable character β+β |
| , | 44 | 2C | 054 | 00101100 | Printable character β,β |
| - | 45 | 2D | 055 | 00101101 | Printable character β-β |
| . | 46 | 2E | 056 | 00101110 | Printable character β.β |
| / | 47 | 2F | 057 | 00101111 | Printable character β/β |
| 0 | 48 | 30 | 060 | 00110000 | Printable character β0β |
| 1 | 49 | 31 | 061 | 00110001 | Printable character β1β |
| 2 | 50 | 32 | 062 | 00110010 | Printable character β2β |
| 3 | 51 | 33 | 063 | 00110011 | Printable character β3β |
| 4 | 52 | 34 | 064 | 00110100 | Printable character β4β |
| 5 | 53 | 35 | 065 | 00110101 | Printable character β5β |
| 6 | 54 | 36 | 066 | 00110110 | Printable character β6β |
| 7 | 55 | 37 | 067 | 00110111 | Printable character β7β |
| 8 | 56 | 38 | 070 | 00111000 | Printable character β8β |
| 9 | 57 | 39 | 071 | 00111001 | Printable character β9β |
| : | 58 | 3A | 072 | 00111010 | Printable character β:β |
| ; | 59 | 3B | 073 | 00111011 | Printable character β;β |
| < | 60 | 3C | 074 | 00111100 | Printable character β<β |
| = | 61 | 3D | 075 | 00111101 | Printable character β=β |
| > | 62 | 3E | 076 | 00111110 | Printable character β>β |
| ? | 63 | 3F | 077 | 00111111 | Printable character β?β |
| @ | 64 | 40 | 100 | 01000000 | Printable character β@β |
| A | 65 | 41 | 101 | 01000001 | Printable character βAβ |
| B | 66 | 42 | 102 | 01000010 | Printable character βBβ |
| C | 67 | 43 | 103 | 01000011 | Printable character βCβ |
| D | 68 | 44 | 104 | 01000100 | Printable character βDβ |
| E | 69 | 45 | 105 | 01000101 | Printable character βEβ |
| F | 70 | 46 | 106 | 01000110 | Printable character βFβ |
| G | 71 | 47 | 107 | 01000111 | Printable character βGβ |
| H | 72 | 48 | 110 | 01001000 | Printable character βHβ |
| I | 73 | 49 | 111 | 01001001 | Printable character βIβ |
| J | 74 | 4A | 112 | 01001010 | Printable character βJβ |
| K | 75 | 4B | 113 | 01001011 | Printable character βKβ |
| L | 76 | 4C | 114 | 01001100 | Printable character βLβ |
| M | 77 | 4D | 115 | 01001101 | Printable character βMβ |
| N | 78 | 4E | 116 | 01001110 | Printable character βNβ |
| O | 79 | 4F | 117 | 01001111 | Printable character βOβ |
| P | 80 | 50 | 120 | 01010000 | Printable character βPβ |
| Q | 81 | 51 | 121 | 01010001 | Printable character βQβ |
| R | 82 | 52 | 122 | 01010010 | Printable character βRβ |
| S | 83 | 53 | 123 | 01010011 | Printable character βSβ |
| T | 84 | 54 | 124 | 01010100 | Printable character βTβ |
| U | 85 | 55 | 125 | 01010101 | Printable character βUβ |
| V | 86 | 56 | 126 | 01010110 | Printable character βVβ |
| W | 87 | 57 | 127 | 01010111 | Printable character βWβ |
| X | 88 | 58 | 130 | 01011000 | Printable character βXβ |
| Y | 89 | 59 | 131 | 01011001 | Printable character βYβ |
| Z | 90 | 5A | 132 | 01011010 | Printable character βZβ |
| [ | 91 | 5B | 133 | 01011011 | Printable character β[β |
| \ | 92 | 5C | 134 | 01011100 | Printable character β\β |
| ] | 93 | 5D | 135 | 01011101 | Printable character β]β |
| ^ | 94 | 5E | 136 | 01011110 | Printable character β^β |
| _ | 95 | 5F | 137 | 01011111 | Printable character β_β |
| ` | 96 | 60 | 140 | 01100000 | Printable character β`β |
| a | 97 | 61 | 141 | 01100001 | Printable character βaβ |
| b | 98 | 62 | 142 | 01100010 | Printable character βbβ |
| c | 99 | 63 | 143 | 01100011 | Printable character βcβ |
| d | 100 | 64 | 144 | 01100100 | Printable character βdβ |
| e | 101 | 65 | 145 | 01100101 | Printable character βeβ |
| f | 102 | 66 | 146 | 01100110 | Printable character βfβ |
| g | 103 | 67 | 147 | 01100111 | Printable character βgβ |
| h | 104 | 68 | 150 | 01101000 | Printable character βhβ |
| i | 105 | 69 | 151 | 01101001 | Printable character βiβ |
| j | 106 | 6A | 152 | 01101010 | Printable character βjβ |
| k | 107 | 6B | 153 | 01101011 | Printable character βkβ |
| l | 108 | 6C | 154 | 01101100 | Printable character βlβ |
| m | 109 | 6D | 155 | 01101101 | Printable character βmβ |
| n | 110 | 6E | 156 | 01101110 | Printable character βnβ |
| o | 111 | 6F | 157 | 01101111 | Printable character βoβ |
| p | 112 | 70 | 160 | 01110000 | Printable character βpβ |
| q | 113 | 71 | 161 | 01110001 | Printable character βqβ |
| r | 114 | 72 | 162 | 01110010 | Printable character βrβ |
| s | 115 | 73 | 163 | 01110011 | Printable character βsβ |
| t | 116 | 74 | 164 | 01110100 | Printable character βtβ |
| u | 117 | 75 | 165 | 01110101 | Printable character βuβ |
| v | 118 | 76 | 166 | 01110110 | Printable character βvβ |
| w | 119 | 77 | 167 | 01110111 | Printable character βwβ |
| x | 120 | 78 | 170 | 01111000 | Printable character βxβ |
| y | 121 | 79 | 171 | 01111001 | Printable character βyβ |
| z | 122 | 7A | 172 | 01111010 | Printable character βzβ |
| { | 123 | 7B | 173 | 01111011 | Printable character β{β |
| | | 124 | 7C | 174 | 01111100 | Printable character β|β |
| } | 125 | 7D | 175 | 01111101 | Printable character β}β |
| ~ | 126 | 7E | 176 | 01111110 | Printable character β~β |
Delete (127)
| Char | Dec | Hex | Oct | Binary | Description |
|---|---|---|---|---|---|
| DEL | 127 | 7F | 177 | 01111111 | Delete |
Quick answer
ASCII is a 7-bit character encoding that maps the integers 0β127 to characters. Codes 0β31 and 127 are non-printing control codes (like NUL, LF, CR, and DEL), code 32 is the space, and codes 33β126 are printable punctuation, digits, and the Latin letters AβZ and aβz. For example, the letter "A" is decimal 65, hex 0x41, octal 101, and binary 01000001.
Formula & method
The table is generated from a fixed list of all 128 ASCII codes. For each code the tool computes the hexadecimal value (base 16, two digits), the octal value (base 8, three digits), and the binary value (base 2, eight bits) directly from the decimal number. Printable codes (32β126) show the actual character; control codes (0β31, plus 127) show their standard mnemonic and C escape sequence where one exists. The search box accepts a decimal number, a hex value (with "0x"), a binary value (with "0b"), an octal value (with "0o"), a control-code mnemonic like LF or SPACE, or a single character, and the lookup card shows the matching code. A bare number is read as decimal, so type 0o101 for octal β and the table below filters to every matching row. Everything runs in your browser β nothing is uploaded.
Examples
- Input
- A
- Result
- dec 65, hex 0x41, oct 101, bin 01000001
- Why
- Uppercase A is ASCII code 65. Lowercase 'a' is 32 higher, at code 97 (0x61).
- Input
- 0x41
- Result
- Character A (dec 65, oct 101, bin 01000001)
- Why
- Typing a hex value resolves to its character β 0x41 is 65 in decimal, which is 'A'.
- Input
- LF
- Result
- dec 10, hex 0x0A, oct 012, bin 00001010, escape \n
- Why
- Typing the mnemonic LF resolves to code 10, the Unix newline (line feed). CR (carriage return) is code 13; Windows line endings use CR+LF together.
- Input
- 32
- Result
- SPACE β dec 32, hex 0x20, oct 040, bin 00100000
- Why
- A bare number is read as decimal, so 32 is the first printable code. Everything below it (0β31) is a non-printing control code.
- Input
- 127
- Result
- DEL β dec 127, hex 0x7F, oct 177, bin 01111111
- Why
- 127 is the highest 7-bit value (all seven bits set) and is the DEL control code, historically used to punch out a tape position.
When to use this tool
- Converting a character to its decimal, hex, octal, or binary code (or the reverse) while coding or debugging.
- Identifying a stray control character β such as a tab, carriage return, or null byte β in a file or network payload.
- Looking up the right escape sequence (like \n, \t, or \0) for a string in C, JavaScript, Python, or a regular expression.
- Teaching or learning how text is stored as numbers and how the same value looks in different bases.
- Building or validating data formats that reserve specific ASCII codes, such as delimiters (0x1F unit separator) or terminators.
Common mistakes
- Assuming ASCII covers characters above 127. Standard ASCII is 7-bit and stops at 127; bytes 128β255 are 'extended ASCII' that depend on a code page (Latin-1, Windows-1252, etc.) and are not part of ASCII proper.
- Confusing the digit characters with their numeric values. The character '0' is code 48, not 0, and '9' is 57 β a frequent source of bugs when converting text digits to numbers.
- Mixing up CR (13) and LF (10). Unix uses LF alone for a newline, classic Mac OS used CR alone, and Windows uses CR+LF, so a stray \r can break parsing.
- Treating uppercase and lowercase as unrelated. 'A' is 65 and 'a' is 97 β they differ by exactly 32 (one bit, 0x20), which is why bit-flipping toggles letter case.
- Reading hex 0x20 as a printable symbol. 0x20 is the space character, which is visible only as blank β not 'nothing'.
Frequently asked questions
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding that assigns the numbers 0 to 127 to letters, digits, punctuation, and control codes. It is a 7-bit standard, so it defines exactly 128 codes and forms the basis of UTF-8 for the first 128 code points.
What is the ASCII code for the letter A?
Uppercase 'A' is decimal 65, hex 0x41, octal 101, and binary 01000001. Lowercase 'a' is decimal 97 (0x61), exactly 32 higher than its uppercase form.
What are control characters in ASCII?
Control characters are codes 0β31 plus 127 (DEL). They are non-printing and signal actions rather than display a glyph β for example LF (10) starts a new line, CR (13) returns the cursor, HT (9) is a tab, and NUL (0) marks an empty value.
How do I look up a control code like LF or CR?
Type its mnemonic into the search box. LF resolves to code 10 (newline), CR to 13, TAB/HT to 9, NUL to 0, SPACE to 32, and DEL to 127. The lookup card and the table both show the matching row with its dec, hex, octal, binary, and escape sequence.
What is the difference between ASCII and Unicode?
ASCII defines only 128 characters (codes 0β127). Unicode is a much larger standard covering virtually every writing system, but it was designed so its first 128 code points are identical to ASCII, which is why ASCII text is also valid UTF-8.
How do I convert a character to its binary value?
Type the character into the search box; the tool shows its 8-bit binary value. For example 'A' is 01000001. Each ASCII code fits in seven bits, so it is padded to eight bits (one byte) with a leading zero.
Why does ASCII only go up to 127?
ASCII is a 7-bit code, and seven bits can represent 2β· = 128 distinct values, numbered 0 through 127. Codes 128β255 require an eighth bit and belong to extended, code-page-specific encodings rather than standard ASCII.
Is my data uploaded when I use this tool?
No. The ASCII table is generated and searched entirely in your browser using JavaScript, so any character or code you type never leaves your device.
Sources & references
External references open in a new tab. We are independent and not affiliated with these organizations.
- β Free to use
- β No sign-up required
- β Runs entirely in your browser β nothing is uploaded.
- β Formula and method shown above
Provided βas isβ for general information only β results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- Number Base ConverterDeveloper
- Binary to Decimal ConverterDeveloper
- Text to Binary ConverterDeveloper
- URL Encoder & DecoderDeveloper
- HTML Entity Encoder and DecoderDeveloper
- Base64 Encoder & DecoderDeveloper
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the ascii table to appear: