Good to know
The codes explained
Every character has a number in the Unicode standard, written as U+ followed by hexadecimal digits. The en dash is U+2013, and every other form the tool shows comes from that number:
| Form | En dash | Where it is used |
|---|---|---|
| Code point | U+2013 | Unicode charts and documentation |
| HTML | – or – | Web pages and HTML emails |
| CSS escape | \2013 | The content property in stylesheets |
| JavaScript | \u2013 | Text inside scripts |
| UTF-8 bytes | E2 80 93 | Files and text sent over the web |
| UTF-16 | 2013 | Inside Windows, Java and JavaScript |
Characters beyond U+FFFF, such as most emoji, take four bytes in UTF-8 and a pair of codes (a surrogate pair) in UTF-16, and JavaScript writes them as \u{1F600}.
Dashes, quotes and spaces
- Hyphen (-) joins words: well-known.
- En dash (–) marks ranges: 9–5, pages 10–12.
- Em dash (—) sets off a phrase inside a sentence.
- Minus (−) is the proper maths sign, the same width as the plus sign.
- Curly quotes (‘ ’ “ ”) are the typographic versions of straight ' and ". The right single quote ’ doubles as the typographic apostrophe.
- Non-breaking space keeps two words on the same line, as in a number and its unit. The zero-width space and the soft hyphen are invisible: the first marks where a long word may break, the second where it may break with a hyphen.
Finding hidden characters
Text copied from documents or websites often carries characters you cannot see: non-breaking spaces, zero-width spaces, curly apostrophes where straight ones were expected. They can break a search, a spreadsheet formula or a discount code. Paste the text into Inspect text and each character is listed with its code point, HTML code and UTF-8 bytes, for up to 200 characters. The inspector works one code point at a time, so an emoji built from several parts, such as a flag or a family, shows each part on its own line.