Convert ASCII Characters to Binary

Convert ASCII text to binary representation. Learn how characters map to 7-bit codes, understand the full ASCII table, and see binary encoding of strings.

ASCII TextBinary (7/8-bit)Encoding

Detailed Explanation

ASCII (American Standard Code for Information Interchange) assigns a 7-bit binary number to 128 characters including letters, digits, punctuation, and control characters. Extended ASCII uses 8 bits for 256 characters.

Step-by-step example — converting "Hello" to binary:

Look up each character's ASCII code and convert to 8-bit binary:

  • H = 72 = 01001000
  • e = 101 = 01100101
  • l = 108 = 01101100
  • l = 108 = 01101100
  • o = 111 = 01101111

Binary: 01001000 01100101 01101100 01101100 01101111

Key ASCII ranges to memorize:

Range Characters Decimal Binary Pattern
Control NUL to US 0-31 000xxxxx
Digits 0-9 48-57 0011xxxx
Upper A-Z 65-90 010xxxxx
Lower a-z 97-122 011xxxxx

Useful patterns:

  • The difference between uppercase and lowercase is exactly 32 (one bit flip): A (65, 01000001) vs a (97, 01100001). Bit 5 (value 32) is the case bit.
  • Digits 0-9 are offset by 48 from their numeric value: '0' = 48, '5' = 53.
  • The space character is 32 (00100000), which is why it comes before all printable characters in sorting.

ASCII in modern computing:

ASCII is the foundation of UTF-8 encoding. The first 128 UTF-8 characters are identical to ASCII, meaning any ASCII text is automatically valid UTF-8. This backward compatibility is one reason UTF-8 became the dominant text encoding on the web. Understanding the binary representation of ASCII characters is crucial for text processing, data serialization, protocol analysis, and low-level string manipulation.

Use Case

Security analysts convert suspicious text to binary ASCII codes when analyzing obfuscated scripts, network traffic captures, or encoded payloads in penetration testing engagements.

Try It — Number Base Converter

Open full tool