TToolbox
ASCII

ASCII Table

Look up decimal and hex codes for characters

About this tool

ASCII (American Standard Code for Information Interchange, ANSI X3.4-1986) is the foundational character encoding heritage of modern computer architectures. Utilizing 7 bits within a standard byte, ASCII maps 128 codes (0–127) comprising 33 non-printable device control characters (LF, CR, NUL, ESC) and 95 printable characters (alphanumeric and punctuation). This tool provides an authoritative lookup table mapping Decimal, Hexadecimal, Octal, Binary, and HTML entities with live search filtering.

How to Use This Tool (Step-by-Step)

1

Search Character or Code

Type any character (`A`), control abbreviation (`CR`), or decimal code (`65`) into the instant search bar.

2

Inspect Multi-Radix Mappings

Inspect side-by-side radix mappings: Decimal, Hex, Octal, Binary, alongside standard C-language escape sequences.

3

Copy Character or Numeric Code

Click any table row to copy the character symbol, hex byte (`0x41`), or decimal integer directly into your codebase.

Comprehensive 0–127 Coverage

Detailed coverage of all 33 legacy control characters (NUL 0 to DEL 127) with keyboard shortcuts and modern escape equivalents.

Side-by-Side Multi-Radix Comparison

Presents parallel Decimal, Hex, Octal, and Binary columns, ideal for embedded firmware developers and packet inspectors.

100% Client-Side Instant Filtering

The entire dictionary resides natively in memory. Instant fuzzy filtering executes with zero latency without server calls.

ASCII Legacy & Line Ending Gotchas

  • •Origins of Windows CRLF (`\r\n`): Mechanical typewriters required two physical steps: roll paper down (Line Feed, LF, 10) and slide the carriage back (Carriage Return, CR, 13). Unix condensed this to LF.
  • •ASCII is the exact first 128-code block of UTF-8: UTF-8 was deliberately engineered to be 100% backward compatible with 7-bit ASCII. Codes 0–127 use identical single bytes.
  • •The ASCII 48 offset for digits: In C, converting char `'5'` to integer `5` is done by subtracting `'0'` (`'5' - '0' = 53 - 48 = 5`).

Code & Transformation Examples

Critical Character ASCII Codes Cheat Sheet

Common Character Sets
• 空字符 (NUL)   : Dec 0   / Hex 0x00
• 换行符 (LF)    : Dec 10  / Hex 0x0A (\n)
• 回车符 (CR)    : Dec 13  / Hex 0x0D (\r)
• 空格键 (Space) : Dec 32  / Hex 0x20
• 数字 '0' - '9' : Dec 48 - 57
• 大写 'A' - 'Z' : Dec 65 - 90
• 小写 'a' - 'z' : Dec 97 - 122
The 32-Offset Bitwise Secret
大写字母 'A' 是 65 (01000001),小写字母 'a' 是 97 (01100001)。两者的二进制仅相差第 6 位(Bit 5)!因此在底层代码中,将字符异或 32 即可实现极速大小写翻转!

* ASCII character order was masterfully engineered so a single bit flip toggles uppercase to lowercase.

JavaScript Character Code Conversion Snippet

Char to Code (charCodeAt)
const code = "A".charCodeAt(0); // 65
const hex = "0x" + code.toString(16); // "0x41"
Code to Char (fromCharCode)
const char = String.fromCharCode(65); // "A"
const enter = String.fromCharCode(10); // "\n" (换行符)

* `String.fromCharCode()` and `charCodeAt()` provide native zero-dependency code point translations.

Frequently Asked Questions

Q: What is Extended ASCII (Codes 128–255)?

A: Standard ASCII uses 7 bits (0–127). Extended 8-bit ASCII (128–255) introduced European accents (ISO-8859-1). Because different codepages conflicted, modern computing standardized on UTF-8.

Q: Why is Backspace 8 and Delete 127 in ASCII?

A: Backspace (8) shifted the typewriter head back one position. DEL (127) is binary `1111111`—on paper tape punches, punching all holes erased a corrupted byte permanently.

Q: Can Chinese characters be found in the ASCII table?

A: No. With only 128 slots, ASCII cannot encode logographic languages. Chinese demands multi-byte encoding schemes like GB18030 or universal UTF-8.

Related Tools

All processing happens locally in your browser. Your data is never uploaded to a server.
/