About special characters
Hyphen, en dash, em dash and minus sign
The hyphen - (U+002D) on your keyboard joins words, as in well-known. The en dash – (U+2013) marks a range, as in pages 10–20. The em dash — (U+2014) breaks a sentence for a pause or an aside. The minus sign − (U+2212, −) is for maths and matches the width of the plus sign in most fonts.
Straight and curly quotes
A keyboard types straight quotes, ' and ". Curly quotes come in pairs, ‘ ’ and “ ”, and the right single quote ’ (U+2019) is also the apostrophe. Word and Google Docs curl quotes as you type. Code needs straight quotes: JSON, JavaScript, SQL and shells only accept them around strings, so a command copied from a document with curly quotes fails.
Non-breaking and invisible spaces
A non-breaking space (U+00A0, ) looks like a space, but a line never wraps at it, which keeps 10 kg together. It also causes bugs: text pasted from a web page can hold a non-breaking or zero-width space, so two strings look equal but compare as different.
Code points and HTML entities
Every character has a Unicode code point, such as U+2014 for the em dash. In HTML you can write it as the named entity —, the decimal reference — (hex 2014 is 8212) or the hex reference —. On a UTF-8 page you can paste the character itself. Entities only work in HTML; in JSON or JavaScript, use the character or \u2014. To turn numeric references back into characters, use the HTML encoder and decoder.
Typing them without this page
Windows: hold Alt and type a code on the numeric keypad: Alt+0150 en dash, Alt+0151 em dash, Alt+0147 / Alt+0148 curly double quotes, Alt+0160 non-breaking space. Win+. opens the emoji panel, which has a Symbols tab.
macOS: Option+- en dash, Option+Shift+- em dash, Option+[ / Option+Shift+[ curly double quotes, Option+Space non-breaking space. Ctrl+Cmd+Space opens the Character Viewer.
What this page does
The picker holds nearly 200 characters in ten groups, from punctuation and currency to arrows, Greek letters, box drawing and invisible spaces. Each tile shows the character, its name and its code point. Click a tile to copy the character, or its entity chip, where a named entity exists, to copy the HTML entity. Search by name, character, code point or entity. Invisible characters carry a label such as NBSP.
Frequently asked questions
- How do I type an em dash?
- On Windows, hold Alt and type 0151 on the numeric keypad. On a Mac, press Option+Shift+hyphen. In HTML, write — or —. Or copy it from the top of this page.
- Why do curly quotes break my code?
- They are different characters from the straight quotes that code uses around strings. Text copied from Word, Google Docs or a chat app often has them. Replace them with straight quotes.
- What is the HTML code for special characters?
- Many have a named entity, such as © for © or € for €. Any character can also be written as &# plus its decimal code point and a semicolon, for example € for €.