9

ASCII Code 57

Nine

About This Character

ASCII code 57 (0x39) represents the Nine character "9". The digit "9" has ASCII code 57. The digits 0–9 occupy consecutive ASCII codes 48–57, which makes numeric conversion straightforward: subtracting 48 (or 0x30) from any digit character’s ASCII code gives its numeric value. The printable ASCII characters (codes 32–126) include the space, digits, uppercase and lowercase Latin letters, and common punctuation symbols. These 95 characters form the foundation of text representation in virtually all computing systems and are universally supported across all character encodings, programming languages, and operating systems.

Character Encoding

Decimal 57
Octal 071
Hexadecimal 0x39
Binary 00111001
HTML Code 9
HTML Entity
Unicode U+0039
Unicode Name DIGIT NINE
URL Escape %39
Quoted-Printable 9
UTF-8 (Hex) 39
Category Printable — Digits

How to Type in Code

JavaScript
// Character literal
let char = '9';
// Using char code
let char2 = String.fromCharCode(57);
// Unicode escape
let char3 = '\x39';
Python
# Character literal
char = '9'
# Using chr()
char = chr(57)
# Using ord() to get code
code = ord('9')  # Returns 57
HTML
<!-- Direct character -->
9
<!-- HTML entity (numeric) -->
&#57;
<!-- Hex entity -->
&#x39;
C#
// Character literal
char c = '9';
// Using cast
char c2 = (char)57;
// To get code from char
int code = (int)'9';  // Returns 57

See Also

Copied!