Skip to content

ASCII Table and Converter

The full ASCII table: 128 characters in decimal, hex, octal and binary, plus a two-way text-to-ASCII converter. Control characters come with escape sequences, caret notation and where you actually meet them.

No Tracking Runs in Browser Free

Everything runs in your browser — your input is never uploaded, logged, or stored.

Text and ASCII code, both ways

The complete ASCII table (0-127)

128 / 128
Dec Hex Oct Binary Char Name Escape Caret HTML Where you meet it
0 00 000 00000000 NUL Null \0 ^@ � C string terminator; separates filenames in find -print0 and xargs -0; makes grep report "Binary file matches".
1 01 001 00000001 SOH Start of Heading ^A  FIX protocol uses it as the field separator, which is why FIX messages look like one run-on line.
2 02 002 00000010 STX Start of Text ^B  Frame header in serial, POS and barcode-scanner protocols; tmux prefix key Ctrl+B.
3 03 003 00000011 ETX End of Text ^C  Ctrl+C sends this byte; the tty line discipline turns it into SIGINT, so your program never sees it.
4 04 004 00000100 EOT End of Transmission ^D  Ctrl+D submits the current input line; when the line is empty the read returns 0 bytes, and that is EOF.
5 05 005 00000101 ENQ Enquiry ^E  Old link handshakes; some terminals answer it with an identification string.
6 06 006 00000110 ACK Acknowledge ^F  Paired with ENQ and NAK in old link-layer protocols; still seen in industrial serial gear.
7 07 007 00000111 BEL Bell \a ^G  printf '\a' rings the bell; more often now it terminates an OSC sequence such as setting the window title.
8 08 010 00001000 BS Backspace \b ^H  Erasing in progress bars. Note most terminals send 0x7F for Backspace, not this byte.
9 09 011 00001001 HT Character Tabulation \t ^I 	 Makefile recipes must start with a real tab; gofmt indents with tabs; Tab and Ctrl+I are the same byte.
10 0A 012 00001010 LF Line Feed \n ^J 
 Newline on Unix and macOS; git's core.autocrlf converts between this and CRLF.
11 0B 013 00001011 VT Line Tabulation \v ^K  Almost extinct, but still counts as a line break: splitlines() splits on it while split("\n") does not.
12 0C 014 00001100 FF Form Feed \f ^L  Printer page break; Ctrl+L clears the terminal; Emacs uses it as a section marker in source files.
13 0D 015 00001101 CR Carriage Return \r ^M 
 The first half of Windows CRLF; shows as ^M in git diff; causes "bad interpreter: /bin/bash^M".
14 0E 016 00001110 SO Shift Out ^N  Switches to the G1 alternate character set in ISO 2022; wraps double-byte regions on EBCDIC mainframes.
15 0F 017 00001111 SI Shift In ^O  Switches back to the G0 default character set, paired with SO.
16 10 020 00010000 DLE Data Link Escape ^P  Byte-stuffing escape prefix in older binary protocols.
17 11 021 00010001 DC1 Device Control One ^Q  XON — software flow control resume; Ctrl+Q unfreezes terminal output.
18 12 022 00010010 DC2 Device Control Two ^R  No fixed modern meaning. Ctrl+R in a shell is a readline binding, unrelated to this code.
19 13 023 00010011 DC3 Device Control Three ^S  XOFF — software flow control pause. Accidentally pressing Ctrl+S is the usual cause of a "frozen" terminal.
20 14 024 00010100 DC4 Device Control Four ^T  No fixed modern meaning; on BSD and macOS Ctrl+T is the tty status key.
21 15 025 00010101 NAK Negative Acknowledge ^U  Ctrl+U erases the whole line — that is the tty kill setting, not this code's original meaning.
22 16 026 00010110 SYN Synchronous Idle ^V  Ctrl+V is lnext: press it then Tab to type a literal tab in bash without triggering completion.
23 17 027 00010111 ETB End of Transmission Block ^W  Ctrl+W erases the previous word — the tty werase setting.
24 18 030 00011000 CAN Cancel ^X  ECMA-48 uses it to abort an unfinished control sequence; terminals discard the sequence being parsed.
25 19 031 00011001 EM End of Medium ^Y  Rarely used today; on BSD and macOS Ctrl+Y is delayed suspend.
26 1A 032 00011010 SUB Substitute ^Z  End-of-file marker in CP/M and DOS text files, which is why Windows consoles end input with Ctrl+Z.
27 1B 033 00011011 ESC Escape ^[  Start of every ANSI escape sequence: \033[0m resets colour, \033[2J clears the screen. Ctrl+[ sends it too.
28 1C 034 00011100 FS File Separator ^\  HL7 v2 MLLP framing uses it as the block terminator; Ctrl+\ sends SIGQUIT.
29 1D 035 00011101 GS Group Separator ^]  In GS1 barcodes the FNC1 separator is this byte — the invisible delimiter your scanner emits.
30 1E 036 00011110 RS Record Separator ^^  RFC 7464 JSON Text Sequences prefix every record with it. One of the few live modern uses.
31 1F 037 00011111 US Unit Separator ^_  Field separator in structured text, safer than a comma because it never appears in the payload.
32 20 040 00100000 Space  
33 21 041 00100001 Exclamation Mark !
34 22 042 00100010 Quotation Mark "
35 23 043 00100011 Number Sign #
36 24 044 00100100 Dollar Sign $
37 25 045 00100101 Percent Sign %
38 26 046 00100110 Ampersand &
39 27 047 00100111 Apostrophe '
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 /
48 30 060 00110000 Digit Zero 0
49 31 061 00110001 Digit One 1
50 32 062 00110010 Digit Two 2
51 33 063 00110011 Digit Three 3
52 34 064 00110100 Digit Four 4
53 35 065 00110101 Digit Five 5
54 36 066 00110110 Digit Six 6
55 37 067 00110111 Digit Seven 7
56 38 070 00111000 Digit Eight 8
57 39 071 00111001 Digit Nine 9
58 3A 072 00111010 Colon :
59 3B 073 00111011 Semicolon &#59;
60 3C 074 00111100 Less-Than Sign <
61 3D 075 00111101 Equals Sign =
62 3E 076 00111110 Greater-Than Sign >
63 3F 077 00111111 Question Mark ?
64 40 100 01000000 Commercial At @
65 41 101 01000001 Latin Capital Letter A A
66 42 102 01000010 Latin Capital Letter B B
67 43 103 01000011 Latin Capital Letter C C
68 44 104 01000100 Latin Capital Letter D D
69 45 105 01000101 Latin Capital Letter E E
70 46 106 01000110 Latin Capital Letter F F
71 47 107 01000111 Latin Capital Letter G G
72 48 110 01001000 Latin Capital Letter H H
73 49 111 01001001 Latin Capital Letter I I
74 4A 112 01001010 Latin Capital Letter J J
75 4B 113 01001011 Latin Capital Letter K K
76 4C 114 01001100 Latin Capital Letter L L
77 4D 115 01001101 Latin Capital Letter M M
78 4E 116 01001110 Latin Capital Letter N N
79 4F 117 01001111 Latin Capital Letter O O
80 50 120 01010000 Latin Capital Letter P P
81 51 121 01010001 Latin Capital Letter Q Q
82 52 122 01010010 Latin Capital Letter R R
83 53 123 01010011 Latin Capital Letter S S
84 54 124 01010100 Latin Capital Letter T T
85 55 125 01010101 Latin Capital Letter U U
86 56 126 01010110 Latin Capital Letter V V
87 57 127 01010111 Latin Capital Letter W W
88 58 130 01011000 Latin Capital Letter X X
89 59 131 01011001 Latin Capital Letter Y Y
90 5A 132 01011010 Latin Capital Letter Z Z
91 5B 133 01011011 Left Square Bracket [
92 5C 134 01011100 Reverse Solidus \
93 5D 135 01011101 Right Square Bracket ]
94 5E 136 01011110 Circumflex Accent ^
95 5F 137 01011111 Low Line _
96 60 140 01100000 Grave Accent `
97 61 141 01100001 Latin Small Letter A a
98 62 142 01100010 Latin Small Letter B b
99 63 143 01100011 Latin Small Letter C c
100 64 144 01100100 Latin Small Letter D d
101 65 145 01100101 Latin Small Letter E e
102 66 146 01100110 Latin Small Letter F f
103 67 147 01100111 Latin Small Letter G g
104 68 150 01101000 Latin Small Letter H h
105 69 151 01101001 Latin Small Letter I i
106 6A 152 01101010 Latin Small Letter J j
107 6B 153 01101011 Latin Small Letter K k
108 6C 154 01101100 Latin Small Letter L l
109 6D 155 01101101 Latin Small Letter M m
110 6E 156 01101110 Latin Small Letter N n
111 6F 157 01101111 Latin Small Letter O o
112 70 160 01110000 Latin Small Letter P p
113 71 161 01110001 Latin Small Letter Q q
114 72 162 01110010 Latin Small Letter R r
115 73 163 01110011 Latin Small Letter S s
116 74 164 01110100 Latin Small Letter T t
117 75 165 01110101 Latin Small Letter U u
118 76 166 01110110 Latin Small Letter V v
119 77 167 01110111 Latin Small Letter W w
120 78 170 01111000 Latin Small Letter X x
121 79 171 01111001 Latin Small Letter Y y
122 7A 172 01111010 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 ^?  What your Backspace key actually sends on most terminals. Named after paper tape: all seven holes punched.

The binary column is padded to 8 bits for readability. ASCII itself is a 7-bit code — the top bit is always 0, which is exactly what lets UTF-8 stay backward compatible with it.

What about 128-255?

ASCII does not define 128-255 at all. "Extended ASCII" is not the name of any standard — it is a loose term for a whole family of 8-bit encodings. The same byte is a different character in each of them:

Byte ISO-8859-1 Windows-1252 CP437 CP866
0x80 U+0080 C1 control (invisible) Ç А
0x93 U+0093 C1 control (invisible) ô У
0xB0 ° °
0xE9 é é Θ щ
0xFF ÿ ÿ U+00A0 U+00A0
Character classifications are cross-checked against Unicode's own categories at test time, and the Windows-1252 mapping is verified byte by byte against the platform decoder. — Go-Tools Engineering · Sep 2, 2026

Every value in the table is generated from a single engine that both the server and the browser run, so what a crawler reads and what you interact with can never drift apart. The language escape differences were verified by compiling and running the code in each language rather than quoted from memory.

Quick reference

What is the ASCII code for A?

A = 65 Uppercase `A` is 65 in decimal, `0x41` in hex, `101` in octal and `01000001` in binary. Lowercase `a` is 97 — exactly 32 more, which is a single bit.

How many characters does ASCII have?

128 128, numbered 0 to 127. That is 32 control characters, 95 graphic characters counting the space, and DEL.

What is ASCII 0?

0 = NUL NUL, the null character. It terminates strings in C, separates filenames in `find -print0`, and makes `grep` treat a file as binary.

Which byte is a newline?

LF = 10, CR = 13 Line feed is 10 (`0x0A`, `\n`). Carriage return is 13 (`0x0D`, `\r`). Windows line endings are both, CR first.

What is ASCII?

ASCII is a 7-bit character encoding — 128 code points, numbered 0 to 127, and no more. It was first published as ASA X3.4-1963 and its current form is ANSI X3.4-1986; RFC 20 describes its use on the internet and was elevated to Internet Standard STD 80 in 2015. The first version had no lowercase letters at all; those arrived in the 1967 revision. Everything above 127 belongs to some other encoding, not to ASCII.

0x00-0x1F   32 C0 control characters
0x20         1 space (a graphic character, not a control)
0x21-0x7E   94 printable graphic characters
0x7F         1 DEL (a control character, but not part of C0)
            ---
            128 total

What this table gives you

All four bases side by side

Decimal, hexadecimal, octal and 8-bit binary for every one of the 128 code points, with the leading zero that reminds you ASCII is really 7-bit.

Escape sequences per language

The \0 \a \b \t \n \v \f \r column plus the differences that actually break builds — JavaScript has no \a, Java has neither \a nor \v, and \e is a GNU extension rather than ISO C.

Caret notation

The ^@ through ^? column, and the one rule that covers all 33 control characters: XOR the byte with 0x40. Not add, not subtract — XOR.

Where you actually meet each control character

Not just "SOH — start of heading", but that FIX protocol messages use it as a field separator, that 0x1D is the invisible separator your barcode scanner emits, and that Ctrl+S freezing your terminal is XOFF.

A converter that refuses to guess

You pick the base. Bytes above 127 are rejected with a note about how they would read in Windows-1252 and ISO-8859-1, instead of being passed off as ASCII.

Control characters stay visible

NUL, TAB and CR have no glyph, so the preview shows them as Unicode Control Pictures. The copy button still gives you the real bytes.

Related encodings

ISO/IEC 8859-1 (Latin-1)

8-bit, single byte

Keeps 0-127 identical to ASCII and defines 96 graphic characters from 0xA0 to 0xFF. The range 0x80-0x9F is left to invisible C1 control characters.

Windows-1252

8-bit, single byte

A superset of ISO-8859-1 whose only difference is 0x80-0x9F, where it places 27 printable characters and leaves 5 undefined. Browsers use it whenever a page claims ISO-8859-1.

CP437

8-bit, single byte

The original IBM PC code page. Its high half is accented letters, Greek and box-drawing characters — those are the tables you see in articles promising 256 ASCII characters.

UTF-8

Variable, 1-4 bytes

Encodes all of Unicode while keeping every ASCII byte byte-for-byte identical. Backward compatible with US-ASCII, but not with any of the 8-bit code pages above.

Examples

Text to decimal codes

Hello
72 101 108 108 111

Each character becomes its decimal code point. Uppercase letters run 65-90, lowercase 97-122 — exactly 32 apart, which is why flipping bit 5 switches case.

The same codes read in two bases

41 42 43
hex -> ABC     decimal -> )*+

This is why the converter never guesses the base for you. Both readings are valid; only you know which one you meant.

Control characters survive the round trip

9 10 13 0
TAB, LF, CR, NUL

They are invisible in the output box, so the preview line shows them as the Unicode Control Pictures characters. The copy button still copies the real bytes, not the stand-ins.

Bytes above 127 are rejected, with an explanation

233
Outside ASCII (0-127)

233 is not an ASCII code. The tool tells you it reads as e-acute in both Windows-1252 and ISO-8859-1, but it will not pretend that is ASCII.

How to use

  1. 1

    Choose the base

    Decimal, hex, octal or binary. Do this first — the same digits decode differently in each base and the tool deliberately will not guess.

  2. 2

    Type on either side

    Text on the left, codes on the right. Whichever one you type in, the other updates.

  3. 3

    Read the warnings

    Characters outside 0-127 are listed with their code point and UTF-8 bytes rather than silently dropped or turned into question marks.

  4. 4

    Use the table as a reference

    Filter to control characters, search by code or name, and click any character to copy it.

Mistakes worth knowing about

Claiming ASCII has 256 characters

ASCII stops at 127. Anything beyond that belongs to a specific 8-bit code page that has to be named. Python will tell you so directly if you ask it to encode an accented character as ASCII.

✗ Wrong
'cafe\u00e9'.encode('ascii')  # UnicodeEncodeError: ordinal not in range(128)
✓ Correct
'cafe\u00e9'.encode('utf-8')   # b'cafe\xc3\xa9'

Assuming every language has the same escapes

JavaScript has no \a escape. Rather than failing, it drops the backslash and leaves you with the letter, and strict mode does not help.

✗ Wrong
"\a".charCodeAt(0)   // 97 - that is the letter 'a', not BEL
✓ Correct
"\x07".charCodeAt(0) // 7 - BEL

Explaining caret notation as addition

Adding 0x40 works for the C0 range and then breaks on DEL, where you would have to subtract instead. XOR is the single rule that covers all 33.

✗ Wrong
caret = chr(code + 0x40)   # 0x7F + 0x40 overflows past the table
✓ Correct
caret = chr(code ^ 0x40)   # 0x00 -> @, 0x1B -> [, 0x7F -> ?

When you need it

Reading a hex dump or a protocol trace
You have bytes and need to know which are printable, which are separators, and which are control codes that the terminal is quietly acting on.
Debugging a file that behaves oddly
A stray CR at the end of every line, a NUL that makes grep call the file binary, or a TAB where a Makefile demanded one.
Writing a parser or a validator
Deciding which byte ranges to accept, and getting the boundaries right — 0x21-0x7E for graphic characters, 0x20 for space, 0x7F for DEL.
Explaining an encoding bug
Showing a colleague why the same byte shows up as three different characters depending on which code page the reader assumed.

Technical details

ASCII, Unicode and UTF-8
Unicode's first 128 code points, U+0000 to U+007F, correspond one-to-one with ASCII. UTF-8 encodes them as single bytes 0x00-0x7F with the top bit clear. The property that actually matters is the third one: every byte of a multi-byte UTF-8 sequence has its top bit set, so a byte in the 0-127 range can never be part of a non-ASCII character. That is what makes it safe to scan UTF-8 for /, \0 or \n a byte at a time.
The 8th bit
ASCII defines a 7-bit code; storing one character per 8-bit byte is a convention, and historically that spare bit was often a parity bit. Mail transports that only guaranteed 7-bit transparency are the reason Base64 and quoted-printable exist.
Why the alphabet is laid out the way it is
Digits 0-9 sit at 0x30-0x39, so the low nibble is the value itself. A is 0x41 and a is 0x61 — one bit apart, so c | 0x20 lowercases and c & 0xDF uppercases. But only for letters: '_' | 0x20 gives 0x7F, which is DEL, and '[' | 0x20 gives {.
National variants and the 0x5C problem
ISO/IEC 646 let 12 code points be swapped per country. Japan's JIS X 0201 put a yen sign at 0x5C, Korea's KS X 1003 put a won sign there — which is why Japanese Windows shows paths with a yen sign while the byte is still 0x5C. It gets worse in Shift_JIS, where the trailing byte of a two-byte character can itself be 0x5C: the characters for hyou, so, juu, nou, kou and bou all end in it, so naive backslash handling splits them in half.

Getting it right

Name the code page, always
"Extended ASCII" tells the reader nothing. Say Windows-1252, or ISO-8859-1, or CP437 — the same byte is a different character in each.
Say US-ASCII when you mean it
That is the IANA registered name. charset=ascii is not it, and in a browser charset=ISO-8859-1 will actually get you Windows-1252, because the WHATWG Encoding Standard maps the label that way.
Never guess a base for the user
If your tool or your parser silently decides that 41 is hex, it will be wrong roughly half the time and the failure is silent.
Iterate by code point, not by UTF-16 unit
"A" + musical clef + Chinese character has .length === 4 but only three characters. Use [...str] or codePointAt, or your "unsupported character" message will report emoji as two broken halves.

Frequently asked questions

How many characters are in ASCII?
128. ASCII is a 7-bit code, so it defines exactly the code points 0 through 127: 32 C0 control characters, 95 graphic characters including the space, and DEL. Articles titled "complete ASCII table (256 characters)" are showing you some specific 8-bit code page — usually CP437 or Windows-1252 — not ASCII.
What is extended ASCII?
Nothing, strictly speaking. "Extended ASCII" is not the name of any standard; it is a loose term for a whole family of 8-bit encodings that keep 0-127 the same and define 128-255 differently. Byte 0xE9 is e-acute in ISO-8859-1, the Greek letter Theta in CP437, and a Cyrillic letter in CP866. Without naming the code page, the question has no answer.
Is Windows-1252 the same as ISO-8859-1?
They are identical from 0xA0 to 0xFF, and completely different from 0x80 to 0x9F. ISO-8859-1 leaves that range to invisible C1 control characters; Windows-1252 puts 27 printable characters there — the euro sign, curly quotes, en and em dashes — and leaves 5 positions undefined. This is why a curly quote copied out of a word processor turns into an invisible control character when it goes through something that really is ISO-8859-1.
Is DEL a control character?
Yes. Unicode classifies U+007F as Cc, and C's iscntrl(127) is true. It just is not part of the C0 set, which is strictly 0x00-0x1F. It sits at the end of the table because of paper tape: 0x7F is seven holes punched, and once you have punched a hole you cannot un-punch it, so "all holes punched" was the only way to mark a character as deleted.
Is the space character a control character?
No, and plenty of ASCII charts get this wrong. Unicode classifies the space (0x20) as Zs, a space separator, which is a graphic character. Only 0x00-0x1F and 0x7F are control characters.
Why does my binary column show 8 bits if ASCII is 7-bit?
Because a byte is the unit everything is actually stored in — the top bit is simply always 0. That padding is not cosmetic: precisely because ASCII never uses the eighth bit, UTF-8 could claim it as the "this is part of a multi-byte sequence" flag, which is what makes UTF-8 backward compatible with ASCII.
Does every language write control characters the same way?
No, and the differences bite. \a (bell) is standard in C and Python, but JavaScript has no such escape — '\a' silently becomes the letter a, with no error even in strict mode. Java rejects both \a and \v. Go rejects \0 because its octal escapes must be exactly three digits, so you write \000. And \e for escape is a GNU extension, not ISO C.
What does ^M mean in a diff or in vim?
It is a carriage return, byte 13. Caret notation writes a control character by XOR-ing its value with 0x40, so CR (0x0D) becomes ^M and ESC (0x1B) becomes ^[. Seeing ^M at the end of every line means the file has Windows CRLF endings; seeing bad interpreter: /bin/bash^M means a shell script picked them up.

Related Tools

View all tools →