Unicode character Superscript Two
About this character
The character ² is known as Unicode character Superscript Two and carries the Unicode code point U+00B2, which is 178 in decimal. It belongs to the Latin-1 Supplement block (U+0080–U+00FF), which gathers the accented letters of Western European languages along with the punctuation and symbols inherited from ISO 8859-1.
In memory, ² takes 2 bytes in UTF-8 (0xC2 0xB2) and 1 in UTF-16 (0x00B2). That difference is why badly configured forms or databases garble this character: they assume one byte per character.
How to type ²
| System | What to do |
|---|---|
| Windows | On Windows, hold Alt and type 178 on the numeric keypad. In Word or WordPad, type 00B2 and press Alt + X to turn the code into the character. |
| macOS | On a Mac, open the Character Viewer with Ctrl + ⌘ + Space and search for “Unicode character Superscript Two”. |
| Linux | On Linux (GTK), type Ctrl + ⇧ + U, 00B2 then press Enter. |
| HTML / Web | In an HTML page, write ². Use \00B2 in CSS, \u00B2 in JavaScript and \u00B2 in Python. |
| On this site | The simplest route is the Copy button above: the character goes straight to your clipboard, ready to paste anywhere. |
Keyboards that include ²
This character sits directly on the following ClavierVirtuel layouts, where you can click it with the mouse:
Codes and encodings
| Property | Value |
|---|---|
| Code point | U+00B2 |
| Unicode block | Latin-1 Supplement (U+0080–U+00FF) |
| Decimal | 178 |
| Hexadecimal | 0x00B2 |
| Octal | 0262 |
| Binary | 10110010 |
| UTF-8 bytes | 0xC2 0xB2 |
| UTF-16 units | 0x00B2 |
| Named HTML entity | ² |
| Decimal HTML entity | ² |
| Hex HTML entity | ² |
| CSS escape | \00B2 |
| JavaScript escape | \u00B2 |
| Python escape | \u00B2 |
| URL encoding | %C2%B2 |
Frequently asked questions
What is the Unicode code for ²?
Its code point is U+00B2, which is 178 in decimal and 0262 in octal. In HTML you can write it as ² or ².
Why does ² show up as a box or a question mark?
An empty box means the font has no glyph for U+00B2. The character is still in the text: switching to a font that covers the block (Noto, DejaVu or Segoe UI Symbol) makes it appear.
Can I use ² in a filename, a URL or a password?
In a URL it must be encoded as %C2%B2. Modern filesystems accept it, though it is still risky when moving files between systems. For passwords, some forms reject non-ASCII characters outright.