U+2642

Mars

Mars is a monochrome text character from the Unicode Miscellaneous Symbols block, listed here under Zodiac & Astronomy and Weather & Nature. Copy it with one click, or use the hex, octal, decimal and HTML entity codes below to embed it in web pages, code, and documents. It is often searched for as "planet", "male".

Quick facts

Unicode
U+2642
Decimal
9794
Hex
0x2642
Octal
0o23102

Unicode identity

FormatValueCopy
Code pointOfficial Unicode notationU+2642
Official nameUnicodeData.txt, Unicode 18.0.0MALE SIGN
DecimalBase 109794
HexadecimalBase 160x2642
OctalBase 80o23102
BinaryBase 20010011001000010
General categorySymbol, otherSo
Unicode blockU+2600–U+26FFMiscellaneous Symbols
PlaneBasic Multilingual Plane (BMP, Plane 0)

HTML & CSS

FormatValueCopy
HTML entity (decimal)♂
HTML entity (hex)♂
HTML entity (named)♂
CSS content escapeUse inside content: "…"\2642
URL encodedPercent-encoded UTF-8%E2%99%82

Programming languages

FormatValueCopy
JavaScript / TypeScript\u2642
JSONUTF-16 surrogate pairs\u2642
Python\u2642
Java / C# / Kotlin\u2642

Byte encodings

FormatValueCopy
UTF-83 bytesE2 99 82
UTF-16 (BE)2642
UTF-32 (BE)00002642

How to type Mars

  • Windows

    Hold Alt and type +2642 with the hex numeric keypad option enabled, or type 2642 then press Alt+X in Word and most Office apps.

  • macOS

    Enable the Unicode Hex Input keyboard, hold Option, and type 2642. Or open Character Viewer (Control+Command+Space) and search "Mars".

  • Linux

    Press Ctrl+Shift+U, type 2642, then press Space or Enter in GTK apps. IBus and most terminals support the same sequence.

  • HTML, CSS & code

    Paste the character directly, or use the escapes above: ♂ in HTML, \2642 in CSS, and \u2642 in JavaScript.

Official Unicode reference

Character name
MALE SIGN
Block
Miscellaneous Symbols (U+2600–U+26FF)
General category
So — Symbol, other

Data from the Unicode Character Database, version 18.0.0. See the official code chart for the Miscellaneous Symbols block: U2600.pdf (PDF, unicode.org).

Frequently asked questions

How do I copy the Mars symbol?

Click the Copy button at the top of this page, or select ♂ and press Ctrl+C (Cmd+C on Mac). It is plain Unicode text, so it pastes into documents, chats, code, and design tools.

What is the Unicode code point for Mars?

Mars is U+2642 (decimal 9794, hexadecimal 0x2642, octal 0o23102). It lives in the Miscellaneous Symbols block (U+2600–U+26FF) of the Basic Multilingual Plane (BMP, Plane 0).

What is the official Unicode name of Mars?

The Unicode Standard (version 18.0.0) names this character "MALE SIGN". Its General_Category is So (Symbol, other).

What is the HTML code for Mars?

Use ♂ or ♂, or the named entity ♂. In CSS, use content: "\2642".

How do I type Mars in code?

JavaScript: "\u2642". Python: "\u2642". JSON and Java: "\u2642". The UTF-8 byte sequence is E2 99 82.

Is Mars an emoji?

No. Mars is a text symbol and renders as a monochrome glyph in the current font. Some platforms may offer an emoji variant when U+FE0F is appended.

View all zodiac & astronomy