U+338E

Milligram

Milligram is a monochrome text character from the Unicode CJK Compatibility block, listed here under Units & Measurements. 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 "mg", "weight", "unit".

Quick facts

Unicode
U+338E
Decimal
13198
Hex
0x338E
Octal
0o31616

Unicode identity

FormatValueCopy
Code pointOfficial Unicode notationU+338E
Official nameUnicodeData.txt, Unicode 18.0.0SQUARE MG
Unicode 1.0 nameLegacy aliasSQUARED MG
DecimalBase 1013198
HexadecimalBase 160x338E
OctalBase 80o31616
BinaryBase 20011001110001110
General categorySymbol, otherSo
Unicode blockU+3300–U+33FFCJK Compatibility
PlaneBasic Multilingual Plane (BMP, Plane 0)

HTML & CSS

FormatValueCopy
HTML entity (decimal)㎎
HTML entity (hex)㎎
CSS content escapeUse inside content: "…"\338E
URL encodedPercent-encoded UTF-8%E3%8E%8E

Programming languages

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

Byte encodings

FormatValueCopy
UTF-83 bytesE3 8E 8E
UTF-16 (BE)338E
UTF-32 (BE)0000338E

How to type Milligram

  • Windows

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

  • macOS

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

  • Linux

    Press Ctrl+Shift+U, type 338e, 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, \338E in CSS, and \u338E in JavaScript.

Official Unicode reference

Character name
SQUARE MG
Unicode 1.0 name
SQUARED MG
Block
CJK Compatibility (U+3300–U+33FF)
General category
So — Symbol, other

Data from the Unicode Character Database, version 18.0.0. See the official code chart for the CJK Compatibility block: U3300.pdf (PDF, unicode.org).

Frequently asked questions

How do I copy the Milligram 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 Milligram?

Milligram is U+338E (decimal 13198, hexadecimal 0x338E, octal 0o31616). It lives in the CJK Compatibility block (U+3300–U+33FF) of the Basic Multilingual Plane (BMP, Plane 0).

What is the official Unicode name of Milligram?

The Unicode Standard (version 18.0.0) names this character "SQUARE MG"; its Unicode 1.0 name was "SQUARED MG". Its General_Category is So (Symbol, other).

What is the HTML code for Milligram?

Use ㎎ or ㎎. In CSS, use content: "\338E".

How do I type Milligram in code?

JavaScript: "\u338E". Python: "\u338E". JSON and Java: "\u338E". The UTF-8 byte sequence is E3 8E 8E.

Is Milligram an emoji?

No. Milligram 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 units & measurements