U+2014 · Dash punctuation
HTML entity
—
Em Dash Symbol —
— is em dash. Write it in HTML as — or paste the character directly. It was added in Unicode 1.1, and Unicode files it under Dash punctuation.
What Unicode says about —
may be used in pairs to offset parenthetical text
— annotation from the Unicode Standard, NamesList.txt
Codes & technical data
| Unicode | U+2014 | |
|---|---|---|
| HTML hex | — | |
| HTML decimal | — | |
| CSS | \2014 | |
| JavaScript | \u{2014} | |
| Python | \U00002014 | |
| Java / C# | \u2014 | |
| Rust | \u{2014} | |
| Swift | \u{2014} | |
| PHP | \u{2014} | |
| URL encoded | %E2%80%94 | |
| UTF-8 bytes | E2 80 94 | |
| UTF-16 bytes | 2014 | |
| Base64 | 4oCU | |
| Decimal | 8212 | |
| HTML entity | — | |
| Category | Dash punctuation (Pd) | |
| Introduced | Unicode 1.1 | |
Will — survive being pasted?
- Normalisation. Yes. — is unchanged by NFKC, so it survives normalising systems intact.
- Legacy encodings. — is Unicode-only — it has no Latin-1 equivalent, so a system stuck on an 8-bit encoding cannot represent it.
- Size. 3 bytes in UTF-8. Character-limited fields — SMS, bios, some form validators — usually count bytes, not characters.
Other dash characters
Unicode names 9 characters ending in “dash”. They differ by direction, weight or decoration rather than by meaning.
Nearby in General Punctuation
The typographic marks that word processors quietly substitute for their ASCII lookalikes — real quotation marks, en and em dashes, the ellipsis. It also holds the invisible characters: zero-width spaces, joiners and directional marks that do work without drawing anything.
How to type —
| Windows | Type 2014 then press Alt+X |
|---|---|
| macOS | Press Ctrl+Cmd+Space, then search for “em dash” |
| Linux | Press Ctrl+Shift+U, type 2014, press Enter |
| HTML | — |
About Unicode’s Dash punctuation category
This is dash punctuation. Line-breaking algorithms are allowed to break a line after a dash, which is why a hyphen behaves differently from a minus sign even when they look almost identical.
Frequently asked questions
- How do I type the — em dash symbol?
- On Windows, type 2014 and press Alt+X. On Linux press Ctrl+Shift+U then 2014. On any system the quickest route is the copy button on this page.
- What is the code for —?
- Em Dash is U+2014, written in HTML as —. In UTF-8 it takes 3 bytes. The table above lists every escape format.
- What kind of character is —?
- Em Dash is filed under Dash punctuation in the General Punctuation block, and was introduced in Unicode 1.1. This is dash punctuation. Line-breaking algorithms are allowed to break a line after a dash, which is why a hyphen behaves differently from a minus sign even when they look almost identical.