How to Type an Em Dash (—): Shortcuts and Copy-Paste
To type an em dash (—), press Option + Shift + - on a Mac, or hold Alt and type 0151 on the numeric keypad in Windows. On a phone, touch and hold the hyphen key. If you only need it once, copy it from the box below. This guide lists the way for every common device and app, shows how to set up a shortcut of your own, and explains what to do when a shortcut refuses to work.
Em dash copy and paste
Select the dash below and copy it. Paste it with the usual paste command.
—
| Item | Value |
|---|---|
| Name | Em dash |
| Unicode | U+2014 (decimal 8212) |
| HTML | —, — or — |
| Windows Alt code | Alt + 0151 on the numeric keypad |
| UTF-8 bytes | E2 80 94 |
For what an em dash is and how to use it in a sentence, see our em dash guide. This page is only about getting the character onto the screen.
How to type an em dash on a Mac
| Method | Steps |
|---|---|
| Keyboard shortcut | Option + Shift + - (the hyphen key), in any app |
| Character Viewer | Press Ctrl + Cmd + Space, search for em dash and double-click the result |
| Auto-convert | System Settings > Keyboard > Text Input > Edit, then turn on Use smart quotes and dashes. Two hyphens typed in a row become an em dash in apps that support it |
If your keyboard layout puts the hyphen on another key, use that key with Option and Shift.
How to type an em dash on Windows
| Method | Steps |
|---|---|
| Alt code | Turn on Num Lock, hold Alt, type 0151 on the numeric keypad and release Alt |
| Emoji panel | Press Win + . (period), switch to the symbols tab and pick the dash |
| Character Map | Open the Character Map app, find the em dash, then choose Select and Copy |
| Word | Type 2014 and press Alt + X; or Ctrl + Alt + - on the numeric keypad |
| Word, automatic | Type two hyphens between two words with no spaces, then keep typing |
The Alt code only works with a numeric keypad. A laptop without one cannot use the number row for this. That is the usual reason people give up on it and use the emoji panel or copy the character instead.
iPhone, iPad and Android
| Device | Steps |
|---|---|
| iPhone and iPad | Open the numbers keyboard, touch and hold the hyphen key, and slide your finger to the longest dash |
| iPhone and iPad, automatic | Settings > General > Keyboard, turn on Smart Punctuation. Typing two hyphens in a row gives an em dash |
| Android with Gboard | Open the symbols page, touch and hold the hyphen key, and choose the em dash |
Other Android keyboards usually hide the dashes behind a long press as well, but the exact spot varies.
Chromebook, Linux and the web
- Chromebook and most Linux desktops: press
Ctrl+Shift+U, type2014, then press Enter or Space. It works in many apps but not in all of them. - Linux with a Compose key: press Compose, then three hyphens. You may have to assign a Compose key in the keyboard settings first.
- Google Docs: Insert > Special characters, then search for
em dash. - Web pages you write: use
—, or the character itself in a file saved as UTF-8.
Set up your own shortcut
If you type em dashes often, a text replacement saves a lot of searching. You choose a short sequence, and the system swaps it for the dash.
| Where | Where to set it up |
|---|---|
| Mac | System Settings > Keyboard > Text Replacements, then add a phrase and paste the dash as the replacement |
| iPhone and iPad | Settings > General > Keyboard > Text Replacement. Use a phrase you will not type on purpose, such as ;md |
| Word | File > Options > Proofing > AutoCorrect Options. Add a replacement under the AutoCorrect tab |
| Google Docs | Tools > Preferences > Substitutions |
Pick a trigger that never appears in normal writing. A replacement such as -- is convenient, but it also fires on command-line options you paste into a document.
In code and markup
| Where | Write it as |
|---|---|
| HTML | — |
CSS content | "\2014" |
| JavaScript, Python, Java, JSON | "\u2014" |
| LaTeX | --- |
| Excel and Google Sheets formula | UNICHAR(8212) |
Markdown has no syntax of its own for the em dash, so paste the character. Some processors, such as Pandoc and markdown-it with its typographer option on, turn three hyphens in running text into an em dash.
When the shortcut does not work
- Check Num Lock. Alt codes need it on, and they need the numeric keypad.
- Try another app. Some apps and browser fields intercept
Altcombinations. Test in Notepad or Word first. - Look at the layout. On a non-US keyboard the hyphen sits elsewhere, and the Mac shortcut moves with it.
- Use the panel or copy it. The emoji panel, Character Viewer and Character Map do not depend on any layout.
- Check for a hotkey clash. Another program may be using the same key combination.
When the dash shows up as something else
- A hyphen or two hyphens: the app did not convert what you typed. Paste the real character.
- A question mark or an empty box: the font or the system does not handle the character. Change the font or the encoding.
- Three odd symbols such as
—: a file saved as UTF-8 was opened with the wrong encoding. Our mojibake guide explains the cause and the fix.
Removing em dashes instead
If the aim is the reverse, the AI Text Cleaner has an Em dash menu. It can keep the dash, or replace each one with a spaced hyphen, a comma or a space. A dash at the very start or end of a line is dropped. The cleaner runs in your browser, so nothing you paste is sent anywhere.
Quick answers
What is the em dash shortcut on a Mac? Option + Shift + -.
What is the em dash Alt code? Alt + 0151 on the numeric keypad. The en dash is Alt + 0150.
How do I type an em dash on a phone? Touch and hold the hyphen key on the numbers or symbols keyboard.
Is two hyphens the same as an em dash? It is the typewriter version. Many apps convert the pair into the real character as you type, and plain-text fields leave it as two hyphens.