'

ASCII Code 39

Single quote

About This Character

ASCII code 39 (0x27) represents the Single quote character "'". The "Single quote" character (') with ASCII code 39 is a punctuation or special symbol in the printable ASCII range. Punctuation characters serve important roles in both natural language writing and programming syntax. 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 39
Octal 047
Hexadecimal 0x27
Binary 00100111
HTML Code '
HTML Entity '
Unicode U+0027
Unicode Name APOSTROPHE
URL Escape %27
Quoted-Printable '
UTF-8 (Hex) 27
Category Printable — Punctuation & Symbols

How to Type in Code

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

See Also

Copied!