ASCII Calculator
Convert between ASCII codes and characters. Get comprehensive information including decimal, binary, hexadecimal, and octal representations for any ASCII character.
**Character to ASCII:**
ASCII Code = charCodeAt(character)
Binary = decimal.toString(2)
Hexadecimal = decimal.toString(16)
Octal = decimal.toString(8)
**ASCII to Character:**
Character = String.fromCharCode(ASCII_code)
**ASCII Code Ranges:**
• 0-31: Control characters (non-printable)
• 32: Space
• 48-57: Digits (0-9)
• 65-90: Uppercase letters (A-Z)
• 97-122: Lowercase letters (a-z)
• 33-47, 58-64, 91-96, 123-127: Special characters
**Conversions:**
Uppercase to Lowercase: ASCII + 32
Lowercase to Uppercase: ASCII - 32
(Example: 'A' = 65, 'a' = 97)
**Example 1: Character to ASCII**
Input: 'A'
Decimal (ASCII): 65
Binary: 01000001
Hexadecimal: 0x41
Octal: 101
Character Type: Uppercase Letter
Calculation Steps:
1. Get character code: charCodeAt('A') = 65
2. Convert to binary: 65 → 01000001
3. Convert to hex: 65 → 0x41
4. Convert to octal: 65 → 101
**Example 2: ASCII to Character**
Input: 97
Character: "a"
Decimal (ASCII): 97
Binary: 01100001
Hexadecimal: 0x61
Octal: 141
Character Type: Lowercase Letter
Calculation Steps:
1. Convert code to character: fromCharCode(97) = 'a'
2. Verify range: 97-122 → Lowercase letter
3. Binary representation: 97 = 64+32+1 = 01100001
🔗 Related Calculators
📐 Formula
**Character to ASCII:**
ASCII Code = charCodeAt(character)
Binary = decimal.toString(2)
Hexadecimal = decimal.toString(16)
Octal = decimal.toString(8)
**ASCII to Character:**
Character = String.fromCharCode(ASCII_code)
**ASCII Code Ranges:**
• 0-31: Control characters (non-printable)
• 32: Space
• 48-57: Digits (0-9)
• 65-90: Uppercase letters (A-Z)
• 97-122: Lowercase letters (a-z)
• 33-47, 58-64, 91-96, 123-127: Special characters
**Conversions:**
Uppercase to Lowercase: ASCII + 32
Lowercase to Uppercase: ASCII - 32
(Example: 'A' = 65, 'a' = 97)
📝 Example Calculation
**Example 1: Character to ASCII**
Input: 'A'
Decimal (ASCII): 65
Binary: 01000001
Hexadecimal: 0x41
Octal: 101
Character Type: Uppercase Letter
Calculation Steps:
1. Get character code: charCodeAt('A') = 65
2. Convert to binary: 65 → 01000001
3. Convert to hex: 65 → 0x41
4. Convert to octal: 65 → 101
**Example 2: ASCII to Character**
Input: 97
Character: "a"
Decimal (ASCII): 97
Binary: 01100001
Hexadecimal: 0x61
Octal: 141
Character Type: Lowercase Letter
Calculation Steps:
1. Convert code to character: fromCharCode(97) = 'a'
2. Verify range: 97-122 → Lowercase letter
3. Binary representation: 97 = 64+32+1 = 01100001