*

ASCII Code 42

Asterisk

About This Character

ASCII code 42 (0x2A) represents the Asterisk character "*". The "Asterisk" character (*) with ASCII code 42 is a mathematical operator. Mathematical operators in the printable ASCII range provide the fundamental arithmetic symbols used in programming, spreadsheets, and mathematical notation. 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 42
Octal 052
Hexadecimal 0x2A
Binary 00101010
HTML Code *
HTML Entity *
Unicode U+002A
Unicode Name ASTERISK
URL Escape %2A
Quoted-Printable *
UTF-8 (Hex) 2A
Category Printable — Mathematical Operators

How to Type in Code

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

See Also

Copied!