🔧Toolify

ASCII Table — Decimal, Hex, Binary, Octal & Character Chart

Browse all 128 ASCII codes (0–127) with their decimal, hexadecimal, octal, and binary representations. Control characters (0–31, 127) are highlighted and labeled with their standard abbreviations and full names. Filter to show only printable characters or only control codes, and search by decimal number, hex value, or character.

DecHexCharDescription
00x00NULNUL — Null
10x01SOHSOH — Start of Heading
20x02STXSTX — Start of Text
30x03ETXETX — End of Text
40x04EOTEOT — End of Transmission
50x05ENQENQ — Enquiry
60x06ACKACK — Acknowledge
70x07BELBEL — Bell
80x08BSBS — Backspace
90x09HTHT — Horizontal Tab
100x0ALFLF — Line Feed
110x0BVTVT — Vertical Tab
120x0CFFFF — Form Feed
130x0DCRCR — Carriage Return
140x0ESOSO — Shift Out
150x0FSISI — Shift In
160x10DLEDLE — Data Link Escape
170x11DC1DC1 — Device Control 1 (XON)
180x12DC2DC2 — Device Control 2
190x13DC3DC3 — Device Control 3 (XOFF)
200x14DC4DC4 — Device Control 4
210x15NAKNAK — Negative Acknowledge
220x16SYNSYN — Synchronous Idle
230x17ETBETB — End of Transmission Block
240x18CANCAN — Cancel
250x19EMEM — End of Medium
260x1ASUBSUB — Substitute
270x1BESCESC — Escape
280x1CFSFS — File Separator
290x1DGSGS — Group Separator
300x1ERSRS — Record Separator
310x1FUSUS — Unit Separator
320x20 SP — Space
330x21!
340x22"
350x23#
360x24$
370x25%
380x26&
390x27'
400x28(
410x29)
420x2A*
430x2B+
440x2C,
450x2D-
460x2E.
470x2F/
480x300
490x311
500x322
510x333
520x344
530x355
540x366
550x377
560x388
570x399
580x3A:
590x3B;
600x3C<
610x3D=
620x3E>
630x3F?
640x40@
650x41A
660x42B
670x43C
680x44D
690x45E
700x46F
710x47G
720x48H
730x49I
740x4AJ
750x4BK
760x4CL
770x4DM
780x4EN
790x4FO
800x50P
810x51Q
820x52R
830x53S
840x54T
850x55U
860x56V
870x57W
880x58X
890x59Y
900x5AZ
910x5B[
920x5C\
930x5D]
940x5E^
950x5F_
960x60`
970x61a
980x62b
990x63c
1000x64d
1010x65e
1020x66f
1030x67g
1040x68h
1050x69i
1060x6Aj
1070x6Bk
1080x6Cl
1090x6Dm
1100x6En
1110x6Fo
1120x70p
1130x71q
1140x72r
1150x73s
1160x74t
1170x75u
1180x76v
1190x77w
1200x78x
1210x79y
1220x7Az
1230x7B{
1240x7C|
1250x7D}
1260x7E~
1270x7FDELDEL — Delete

Showing 128 of 128 ASCII codes

How it works

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard originally published in 1963. It defines 128 characters: 33 non-printing control characters (codes 0–31 and 127) and 95 printable characters (codes 32–126), including uppercase and lowercase English letters, digits 0–9, and common punctuation marks. ASCII became the foundation for virtually every modern text encoding, including UTF-8, which is backward-compatible with ASCII for the first 128 code points.

Each ASCII character is assigned a 7-bit integer value, which is why the table stops at 127 (2⁷ − 1). When stored in an 8-bit byte, the leading bit is typically 0 for standard ASCII. The extended ASCII range (128–255) is not standardized by the original spec and varies by code page — ISO 8859-1, Windows-1252, and similar encodings each define a different set of characters for the upper half of the byte.

Control characters (0–31 and 127)

The first 32 ASCII codes and code 127 are non-printing control characters inherited from teletype machine conventions. Most are obsolete in modern computing, but several remain important: code 9 (HT, horizontal tab), code 10 (LF, line feed or newline on Unix/Linux), code 13 (CR, carriage return, used in Windows line endings as CR+LF), code 27 (ESC, Escape, used in terminal escape sequences), and code 127 (DEL). These characters are not rendered as visible glyphs.

On Unix-like systems, you can generate control characters in a terminal by holding Ctrl and pressing the corresponding letter: Ctrl+A = SOH (1), Ctrl+C = ETX (3, sends interrupt signal), Ctrl+D = EOT (4, signals end of input), Ctrl+J = LF (10), Ctrl+M = CR (13), Ctrl+Z = SUB (26, suspends a process on Unix). Understanding these codes is essential for low-level I/O, terminal control sequences, and network protocol implementation.

ASCII in programming and web development

In JavaScript, you can get the ASCII code of a character using charCodeAt(0): 'A'.charCodeAt(0) returns 65. To convert back, use String.fromCharCode(65) to get 'A'. In Python, ord('A') returns 65 and chr(65) returns 'A'. In C, char values are integers and can be used directly in arithmetic: 'A' + 1 equals 'B'.

ASCII values are the basis for many common programming patterns. The difference between uppercase and lowercase letters is always 32: 'a' (97) = 'A' (65) + 32. Digits 0–9 occupy codes 48–57, so subtracting 48 from a digit character's ASCII value gives its numeric value. URL encoding represents non-URL-safe characters as %XX where XX is the hex ASCII code, making this table essential for debugging URL-encoded strings and HTTP headers.

Frequently asked questions

What is the ASCII code for Enter / newline?

The newline (line feed) character is ASCII code 10 (0x0A, LF). On Unix/Linux/macOS, a newline is represented by LF alone. On Windows, a newline is CR+LF (codes 13 and 10, or 0x0D 0x0A). The carriage return character is code 13 (0x0D, CR). When writing cross-platform text processing code, always handle both LF and CR+LF line endings.

What is the ASCII code for the space character?

The space character is ASCII code 32 (0x20, SP). It is the first printable ASCII character. The non-breaking space (used in HTML as &nbsp;) is not part of standard 7-bit ASCII — it is code 160 (0xA0) in ISO 8859-1 and UTF-8 (encoded as 0xC2 0xA0 in UTF-8).

What is the difference between ASCII, UTF-8, and Unicode?

ASCII defines 128 characters with 7-bit codes. Unicode is a universal standard that defines over 140,000 characters with code points up to U+10FFFF. UTF-8 is a variable-width encoding of Unicode: it encodes ASCII characters (0–127) in a single byte, making it backward-compatible with ASCII. Characters beyond 127 use 2–4 bytes in UTF-8. Modern text systems use UTF-8 or UTF-16, but ASCII remains important for protocol headers, file formats, and legacy systems.

How do I find the ASCII code of a character in JavaScript?

Use charCodeAt(0): 'A'.charCodeAt(0) returns 65. For Unicode code points beyond 65535, use codePointAt(0) instead. To convert a code back to a character: String.fromCharCode(65) returns 'A'. For full Unicode support: String.fromCodePoint(128512) returns the 😀 emoji.

What does ASCII code 0 (NUL) do?

NUL (code 0) is the null character. In C and many other languages, it is used as a string terminator — a string 'Hello' is stored in memory as the bytes 72, 101, 108, 108, 111, 0. In databases and file formats, NUL can appear as a field separator or padding byte. In most text editors and terminals, NUL is invisible and ignored, but it can cause problems when reading binary files as text.

What is the Escape character (ASCII 27)?

ESC (code 27, 0x1B) is the Escape character. It is the start of ANSI/VT100 escape sequences, which control terminal colors and cursor movement. For example, the sequence ESC[31m changes the terminal text color to red. In many applications, pressing the Escape key sends this character. It is also used in various data formats and communication protocols.

Why does uppercase A have ASCII code 65 and lowercase a have 97?

The ASCII table was designed so that uppercase letters (A=65, B=66, ..., Z=90) and lowercase letters (a=97, b=98, ..., z=122) differ by exactly 32. This allows converting between cases with a single addition or subtraction. To convert uppercase to lowercase in ASCII: add 32 (or set bit 5). To convert lowercase to uppercase: subtract 32 (or clear bit 5). This is why bitwise case conversion works in C: char lower = upper | 0x20.

What is the difference between CR, LF, and CRLF?

CR (Carriage Return, code 13) and LF (Line Feed, code 10) originated from typewriter/teletype conventions. CR moves the print head to the beginning of the line; LF advances to the next line. Unix/Linux uses LF alone for newlines. Windows uses CR+LF (both together). Classic Mac OS (before OS X) used CR alone. Most modern parsers handle all three, but mixing line endings in source files causes problems with version control diffs and some text processors.

Related tools

Last updated:

Try our AI prompts →