6

ASCII Code 54

Six

About This Character

ASCII code 54 (0x36) represents the Six character "6". The digit "6" has ASCII code 54. 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 54
Octal 066
Hexadecimal 0x36
Binary 00110110
HTML Code 6
HTML Entity
Unicode U+0036
Unicode Name DIGIT SIX
URL Escape %36
Quoted-Printable 6
UTF-8 (Hex) 36
Category Printable — Digits

How to Type in Code

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

See Also

Copied!