Skip to content
ASCII World
*

Asterisk

PrintableASCII 42 | Hex 0x2A | U+002A
ASCII 42 originated as a footnote marker in typography before computing adopted it as the multiplication operator. In C and C++, the asterisk dereferences pointers and declares pointer types, making it one of the most context-dependent characters in those languages. Unix shells use * as a glob wildcard matching any sequence of characters in filenames. Markdown uses single asterisks for italic text and double asterisks for bold.

ASCII Code

Decimal
42
Hexadecimal
0x2A
Octal
52
Binary
0010 1010
URL Escape
%2A

Unicode

Code Point
U+002A
Escape
\u002a
UTF-8 Hex
0x2A
UTF-8 Binary
00101010
UTF-16
0x002A
UTF-32
0x0000002A

HTML Entities

Numeric
*
Hex
*
Named
*

How to Type

Windows Alt CodeAlt + 42
HTML Entity
*
Unicode InputU+002A

Source Code Representations

C / Java
"\u002A"
CSS
\002A
JavaScript
"\u002A"
Perl
\x{002A}
Python 2
u"\u002A"
Python 3
\u002A
Ruby
\u{002A}

Frequently Asked Questions

What is ASCII code 42?
ASCII code 42 represents the Asterisk character. In hexadecimal it is 0x2A, in binary 0010 1010, and in octal 52. It is a printable character that appears as "*" in text.
How do I type ASCII 42 on a keyboard?
On Windows, hold Alt and type 42 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity * or *.