U+00B2 · Other number
HTML entity
²
Superscript Two Symbol ²
² is superscript two, and Unicode gives it the numeric value 2. It was added in Unicode 1.1, and Unicode files it under Other number.
Also known as
- squared
Unicode 1.0 called this character superscript digit two. The standard renamed it later, but documents, fonts and font-editing tools from that era still use the old name.
What Unicode says about ²
other superscript digit characters: 2070-2079
— annotation from the Unicode Standard, NamesList.txt
Codes & technical data
| Unicode | U+00B2 | |
|---|---|---|
| HTML hex | ² | |
| HTML decimal | ² | |
| CSS | \00B2 | |
| JavaScript | \u{00B2} | |
| Python | \U000000B2 | |
| Java / C# | \u00B2 | |
| Rust | \u{00b2} | |
| Swift | \u{00B2} | |
| PHP | \u{00B2} | |
| URL encoded | %C2%B2 | |
| UTF-8 bytes | C2 B2 | |
| UTF-16 bytes | 00B2 | |
| Base64 | wrI= | |
| Decimal | 178 | |
| HTML entity | ² | |
| Decomposes to | 2 (super form) | |
| Numeric value | 2 | |
| Category | Other number (No) | |
| Introduced | Unicode 1.1 | |
Will ² survive being pasted?
- Normalisation. No. Anything that applies NFKC — search indexes, usernames, domain names, programming identifiers — rewrites ² as
2. Safe for display, not for storage. - Legacy encodings. ² exists in Latin-1 and Windows-1252, so even software that predates Unicode can store it.
- Size. 2 bytes in UTF-8. Character-limited fields — SMS, bios, some form validators — usually count bytes, not characters.
Unicode cross-references
The standard points readers of ² at these characters — usually because they look alike, or because one is the correct choice where the other is often used by mistake.
Other two characters
Unicode names 10 characters ending in “two”. They differ by direction, weight or decoration rather than by meaning.
Nearby in Latin-1 Supplement
The upper half of ISO 8859-1: the accented letters and the symbols that Western European printing needed but ASCII had no room for. This is where ° ± × ÷ £ ¥ © ® ½ ¼ live, which makes it the most-copied symbol block in Unicode despite being one of the oldest.
How to type ²
| Windows | Type 00B2 then press Alt+X, or hold Alt and type 178 on the numeric keypad |
|---|---|
| macOS | Press Ctrl+Cmd+Space, then search for “superscript two” |
| Linux | Press Ctrl+Shift+U, type 00b2, press Enter |
| HTML | ² |
About Unicode’s Other number category
This is classified as a number that is not a plain digit — a fraction, a superscript figure, a circled or bracketed numeral. Software will not parse it as a number without being told to.
Frequently asked questions
- How do I type the ² superscript two symbol?
- On Windows, type 00B2 and press Alt+X. You can also hold Alt and type 178 on the numeric keypad. On Linux press Ctrl+Shift+U then 00b2. On any system the quickest route is the copy button on this page.
- What is the code for ²?
- Superscript Two is U+00B2, written in HTML as ². In UTF-8 it takes 2 bytes. The table above lists every escape format.
- Will ² survive being pasted anywhere?
- Not always. Superscript Two is a compatibility character: any system that applies Unicode NFKC normalisation — search indexes, usernames, identifiers — replaces it with 2. Use it for display, not where text is normalised.