ASCII Table

Complete ASCII character table with decimal, hex, octal, binary values. Look up ASCII codes, control characters, and printable characters.

Search and Filter

ASCII Character Table

DecimalHexOctalBinaryCharHTMLDescriptionActions
00x0000000000000
NUL
�NUL (Null)
10x0100010000001
SOH
SOH (Start of Heading)
20x0200020000010
STX
STX (Start of Text)
30x0300030000011
ETX
ETX (End of Text)
40x0400040000100
EOT
EOT (End of Transmission)
50x0500050000101
ENQ
ENQ (Enquiry)
60x0600060000110
ACK
ACK (Acknowledge)
70x0700070000111
BEL
BEL (Bell)
80x0800100001000
BS
BS (Backspace)
90x0900110001001
TAB
	TAB (Horizontal Tab)
100x0A00120001010
LF

LF (Line Feed)
110x0B00130001011
VT
VT (Vertical Tab)
120x0C00140001100
FF
FF (Form Feed)
130x0D00150001101
CR

CR (Carriage Return)
140x0E00160001110
SO
SO (Shift Out)
150x0F00170001111
SI
SI (Shift In)
160x1000200010000
DLE
DLE (Data Link Escape)
170x1100210010001
DC1
DC1 (Device Control 1)
180x1200220010010
DC2
DC2 (Device Control 2)
190x1300230010011
DC3
DC3 (Device Control 3)
200x1400240010100
DC4
DC4 (Device Control 4)
210x1500250010101
NAK
NAK (Negative Acknowledge)
220x1600260010110
SYN
SYN (Synchronous Idle)
230x1700270010111
ETB
ETB (End of Transmission Block)
240x1800300011000
CAN
CAN (Cancel)
250x1900310011001
EM
EM (End of Medium)
260x1A00320011010
SUB
SUB (Substitute)
270x1B00330011011
ESC
ESC (Escape)
280x1C00340011100
FS
FS (File Separator)
290x1D00350011101
GS
GS (Group Separator)
300x1E00360011110
RS
RS (Record Separator)
310x1F00370011111
US
US (Unit Separator)
320x2000400100000 Printable character:
330x2100410100001!!Punctuation/Symbol: !
340x2200420100010""Punctuation/Symbol: "
350x2300430100011##Punctuation/Symbol: #
360x2400440100100$$Punctuation/Symbol: $
370x2500450100101%%Punctuation/Symbol: %
380x2600460100110&&Punctuation/Symbol: &
390x2700470100111''Punctuation/Symbol: '
400x2800500101000((Punctuation/Symbol: (
410x2900510101001))Punctuation/Symbol: )
420x2A00520101010**Punctuation/Symbol: *
430x2B00530101011++Punctuation/Symbol: +
440x2C00540101100,,Punctuation/Symbol: ,
450x2D00550101101--Punctuation/Symbol: -
460x2E00560101110..Punctuation/Symbol: .
470x2F00570101111//Punctuation/Symbol: /
480x300060011000000Digit: 0
490x310061011000111Digit: 1
500x320062011001022Digit: 2
510x330063011001133Digit: 3
520x340064011010044Digit: 4
530x350065011010155Digit: 5
540x360066011011066Digit: 6
550x370067011011177Digit: 7
560x380070011100088Digit: 8
570x390071011100199Digit: 9
580x3A00720111010::Punctuation/Symbol: :
590x3B00730111011;;Punctuation/Symbol: ;
600x3C00740111100<&lt;Punctuation/Symbol: <
610x3D00750111101==Punctuation/Symbol: =
620x3E00760111110>&gt;Punctuation/Symbol: >
630x3F00770111111??Punctuation/Symbol: ?
640x4001001000000@@Punctuation/Symbol: @
650x4101011000001AAUppercase letter: A
660x4201021000010BBUppercase letter: B
670x4301031000011CCUppercase letter: C
680x4401041000100DDUppercase letter: D
690x4501051000101EEUppercase letter: E
700x4601061000110FFUppercase letter: F
710x4701071000111GGUppercase letter: G
720x4801101001000HHUppercase letter: H
730x4901111001001IIUppercase letter: I
740x4A01121001010JJUppercase letter: J
750x4B01131001011KKUppercase letter: K
760x4C01141001100LLUppercase letter: L
770x4D01151001101MMUppercase letter: M
780x4E01161001110NNUppercase letter: N
790x4F01171001111OOUppercase letter: O
800x5001201010000PPUppercase letter: P
810x5101211010001QQUppercase letter: Q
820x5201221010010RRUppercase letter: R
830x5301231010011SSUppercase letter: S
840x5401241010100TTUppercase letter: T
850x5501251010101UUUppercase letter: U
860x5601261010110VVUppercase letter: V
870x5701271010111WWUppercase letter: W
880x5801301011000XXUppercase letter: X
890x5901311011001YYUppercase letter: Y
900x5A01321011010ZZUppercase letter: Z
910x5B01331011011[[Punctuation/Symbol: [
920x5C01341011100\\Punctuation/Symbol: \
930x5D01351011101]]Punctuation/Symbol: ]
940x5E01361011110^^Punctuation/Symbol: ^
950x5F01371011111__Punctuation/Symbol: _
960x6001401100000``Punctuation/Symbol: `
970x6101411100001aaLowercase letter: a
980x6201421100010bbLowercase letter: b
990x6301431100011ccLowercase letter: c
1000x6401441100100ddLowercase letter: d
1010x6501451100101eeLowercase letter: e
1020x6601461100110ffLowercase letter: f
1030x6701471100111ggLowercase letter: g
1040x6801501101000hhLowercase letter: h
1050x6901511101001iiLowercase letter: i
1060x6A01521101010jjLowercase letter: j
1070x6B01531101011kkLowercase letter: k
1080x6C01541101100llLowercase letter: l
1090x6D01551101101mmLowercase letter: m
1100x6E01561101110nnLowercase letter: n
1110x6F01571101111ooLowercase letter: o
1120x7001601110000ppLowercase letter: p
1130x7101611110001qqLowercase letter: q
1140x7201621110010rrLowercase letter: r
1150x7301631110011ssLowercase letter: s
1160x7401641110100ttLowercase letter: t
1170x7501651110101uuLowercase letter: u
1180x7601661110110vvLowercase letter: v
1190x7701671110111wwLowercase letter: w
1200x7801701111000xxLowercase letter: x
1210x7901711111001yyLowercase letter: y
1220x7A01721111010zzLowercase letter: z
1230x7B01731111011{{Punctuation/Symbol: {
1240x7C01741111100||Punctuation/Symbol: |
1250x7D01751111101}}Punctuation/Symbol: }
1260x7E01761111110~~Punctuation/Symbol: ~
1270x7F01771111111
DEL
&#127;DEL (Delete)

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers and other devices. Developed in the 1960s, ASCII was the first widely used character encoding standard and remains fundamental to computing today. The ASCII standard uses 7 bits to represent 128 different characters, including letters, digits, punctuation marks, and control characters.

ASCII was first published as a standard in 1963 by the American Standards Association (now ANSI). It was designed to ensure compatibility between different computer systems and communication devices. The original ASCII standard included 128 characters, with the first 32 being non-printable control characters used for device control and formatting, and characters 32-126 being printable characters including uppercase and lowercase letters, digits, and punctuation.

Understanding ASCII is crucial for developers, system administrators, and anyone working with text encoding. ASCII forms the basis for many modern character encodings, including UTF-8, which is backward compatible with ASCII. All ASCII characters have the same codes in UTF-8, making ASCII knowledge essential for understanding character encoding and text processing in programming.

ASCII Character Categories

ASCII characters are divided into two main categories: control characters and printable characters. Each category serves specific purposes in computing and text processing:

Control Characters (0-31, 127)

Control characters are non-printable characters used for device control and data formatting. These include characters like TAB (9), Line Feed (10), Carriage Return (13), and Escape (27). Control characters don't have a visual representation but control how text is processed and displayed. For example, TAB moves the cursor to the next tab stop, LF moves to the next line, and CR returns the cursor to the beginning of the line. These characters are essential for text formatting, terminal control, and data communication protocols.

Printable Characters (32-126)

Printable characters include all ASCII characters that have a visual representation. This category includes the space character (32), uppercase letters A-Z (65-90), lowercase letters a-z (97-122), digits 0-9 (48-57), and various punctuation marks and symbols. Printable characters are what users typically see and interact with when reading text. The printable ASCII range ensures compatibility across different systems and is the foundation for English text representation in computing.

How to Use This ASCII Table

Our ASCII table provides a comprehensive reference for all 128 ASCII characters. Use it to quickly find character codes and their representations:

  • Browse the table to find characters by decimal value, hex code, character, or description
  • Filter by category using the category buttons to view only control characters or printable characters
  • Search for specific characters by entering a decimal number, hex code, character, or description keywords
  • Click on any row to view detailed information and copy character codes in different formats (decimal, hex, octal, binary)

For more encoding and conversion tools, check out our Toolbox homepage or explore related tools like our Binary to Text Converter and Base64 Encoder for character encoding workflows.

Using ASCII in Programming

ASCII codes are commonly used in programming for character manipulation, encoding, and text processing. Here are examples of how to work with ASCII in different programming languages:

  • JavaScript: Use String.fromCharCode(65) to get character 'A' from ASCII code 65, or 'A'.charCodeAt(0) to get ASCII code 65 from character 'A'. You can also use escape sequences like '\x41' for hex or '\101' for octal.
  • Python: Use chr(65) to get character 'A' from ASCII code 65, or ord('A') to get ASCII code 65 from character 'A'. Python 3 uses Unicode by default, but ASCII is a subset of Unicode.
  • Java: Use (char)65 to cast integer to character, or (int)'A' to get ASCII code. Java's char type represents Unicode characters, but ASCII characters (0-127) have the same values in Unicode.
  • C#: Use Convert.ToChar(65) or (char)65 to get character from ASCII code, or (int)'A' to get ASCII code from character. C# char type is 16-bit Unicode, with ASCII being a subset.

ASCII vs Unicode

While ASCII is limited to 128 characters and primarily supports English text, Unicode is a much more comprehensive standard that can represent over 1 million characters from multiple languages and scripts worldwide.

ASCII is fully compatible with Unicode and UTF-8. The first 128 Unicode characters (U+0000 to U+007F) are identical to ASCII characters. This means any valid ASCII text is also valid UTF-8 text, making UTF-8 backward compatible with ASCII. This compatibility is why ASCII knowledge remains relevant even in modern Unicode-based systems.

Use ASCII when working with legacy systems, simple English text processing, or when you need the smallest possible encoding (7 bits per character). Use Unicode (UTF-8, UTF-16, etc.) when you need to support multiple languages, special characters, emojis, or international text. For most modern applications, UTF-8 is recommended as it combines Unicode's comprehensive character support with ASCII compatibility and efficient encoding.

For more information on Unicode, refer to the Unicode Consortium and the UTF-8 Wikipedia article for comprehensive documentation.

Best Practices for Working with ASCII

Following best practices ensures optimal results when working with ASCII characters. Here are key recommendations:

Encoding Awareness

Encoding Awareness: Always be aware of the encoding when processing text. ASCII is 7-bit, but many systems use extended ASCII (8-bit) or UTF-8. Ensure your tools and code handle the encoding correctly to avoid character corruption.

Handling Control Characters

Handling Control Characters: Control characters (0-31, 127) have specific purposes. Don't remove them blindly - TAB, LF, CR are essential for formatting. Understand what each control character does before modifying text containing them.

Case Sensitivity

Case Sensitivity: ASCII distinguishes between uppercase (65-90) and lowercase (97-122). Be mindful of case-sensitive operations. Use case-insensitive comparisons when appropriate, but preserve case when it matters (like in code or proper nouns).

Input Validation

Input Validation: When accepting ASCII input, validate that characters are within the expected range. Reject or convert characters outside ASCII range (128-255 in extended ASCII, or any non-ASCII in pure ASCII) based on your requirements.

Troubleshooting ASCII Issues

When working with ASCII, you may encounter various issues. Here are common problems and their solutions:

Encoding Problems

Encoding Problems: If you see garbled characters or question marks, the text might not be in ASCII encoding. Check the file encoding (UTF-8, ISO-8859-1, Windows-1252) and convert if necessary. Use encoding detection tools to identify the correct encoding.

Control Character Issues

Control Character Issues: Unexpected line breaks, tabs, or formatting issues often stem from control characters. Use a hex editor or text editor's 'show whitespace' feature to identify control characters. Remove or replace them based on your needs.

Extended ASCII Confusion

Extended ASCII Confusion: Extended ASCII (128-255) varies by system and locale. Characters in this range are not part of standard ASCII. For portability, stick to standard ASCII (0-127) or use UTF-8 for international characters.

Case Conversion Problems

Case Conversion Problems: Case conversion requires understanding ASCII values. Uppercase to lowercase: add 32 (or use language-specific functions). Be careful with non-letter characters - they don't have case equivalents.

Tips and Tricks for ASCII

Master these advanced techniques to get the most out of ASCII:

  • Quick Reference: Quick Reference: Memorize key ASCII values: 'A'=65, 'a'=97, '0'=48, space=32. Use these for quick calculations. The difference between uppercase and lowercase is always 32 in ASCII.
  • Bitwise Operations: Bitwise Operations: ASCII values can be manipulated with bitwise operations. For example, to convert to uppercase: value & 0xDF, to lowercase: value | 0x20. These tricks are useful in low-level programming.
  • Validation Techniques: Validation Techniques: Check if a character is ASCII: value >= 0 && value <= 127. Check if printable: value >= 32 && value < 127. Check if letter: (value >= 65 && value <= 90) || (value >= 97 && value <= 122).
  • Conversion Shortcuts: Conversion Shortcuts: Convert digit to integer: char - '0' (or char - 48). Convert letter to 0-25: (char | 0x20) - 'a'. These shortcuts work because ASCII digits and letters are consecutive.

Performance Considerations

Understanding performance characteristics helps you work efficiently with ASCII:

Memory Efficiency

Memory Efficiency: ASCII uses 7 bits per character, making it very memory-efficient. In UTF-8, ASCII characters still use only 1 byte. For large text processing, ASCII is optimal if you don't need international characters.

Processing Speed

Processing Speed: ASCII operations are fast because characters fit in single bytes. String operations, comparisons, and searches are efficient. For performance-critical code processing only English text, ASCII is ideal.

Compatibility Benefits

Compatibility Benefits: ASCII's universal compatibility means no encoding conversion overhead. Text can be processed directly without decoding/encoding steps, improving performance in text processing pipelines.

When to Use Modern Alternatives

When to Use Modern Alternatives: While ASCII is efficient, UTF-8 is the modern standard. Use UTF-8 for new projects - it's ASCII-compatible but supports international characters. Only use pure ASCII when you have specific constraints (legacy systems, embedded devices with limited memory).

Related Character Encoding Tools

Our ASCII table works great with other character encoding and text processing tools. Here's when to use each tool:

Binary to Text Converter

Binary to Text Converter: Convert between ASCII and binary representations. Useful for understanding how text is stored in binary format. Combine with our ASCII table to understand the relationship between characters and their binary values.

Use our Binary to Text Converter to convert between ASCII and binary.

Base64 Encoder

Base64 Encoder: Base64 encoding uses ASCII characters (A-Z, a-z, 0-9, +, /) to represent binary data. Understanding ASCII is essential for working with Base64. Use our Base64 encoder to encode/decode data using ASCII-safe characters.

Encode and decode data with our Base64 Encoder using ASCII-safe characters.

Hash Generator

Hash Generator: Hash functions work with byte sequences, and ASCII text provides predictable byte values. Use our hash generator with ASCII text to create checksums and verify data integrity.

Generate hashes with our Hash Generator for ASCII text.

Workflow Examples

Workflow Examples: A common workflow is: check ASCII table → convert to binary → encode with Base64 → generate hash. For text processing: validate ASCII range → convert case → encode entities → verify encoding. For debugging: view hex values → check ASCII codes → identify control characters → fix encoding issues.

Explore all our character encoding and conversion tools to build complete encoding workflows.