What an em dash is and when to use it

An em dash is a long horizontal line (—) used in writing to create a pause, add emphasis, or set off a phrase within a sentence. It is longer than a hyphen (-) and longer than an en dash (–). In formal writing, an em dash replaces a comma, semicolon, or parentheses when you want a stronger break: "She had one goal in mind—to finish the project by Friday." On most keyboards, you cannot type an em dash directly; you have to use a keyboard shortcut, menu option, or special code depending on your device and software.

The em dash gets its name from the width of the letter M in typography. It serves three main purposes: to show an interruption in dialogue, to add emphasis or explanation to a sentence, or to replace other punctuation marks when you want a more dramatic pause. Many writers prefer it over dashes created by typing two hyphens (--), which some word processors automatically convert to an em dash anyway.

Key Takeaways

  • On Windows, hold Alt and type 0151 on the numeric keypad to create an em dash.
  • On Mac, press Option and Shift together, then press the hyphen key to create an em dash.
  • In Microsoft Word and Google Docs, you can type two hyphens followed by a space, and the software will automatically convert it to an em dash.
  • On phones and tablets, access the em dash through the symbols keyboard or by holding down the hyphen key until a menu appears.
  • HTML code for an em dash is — if you are writing web content or editing HTML directly.

Creating an em dash on Windows

The most reliable method on Windows is the Alt code. Hold down the Alt key on your keyboard, then type 0151 on the numeric keypad (the number pad on the right side of most full-size keyboards). Release Alt, and an em dash will appear. This works in most programs: Word, email clients, web browsers, and text editors. The numeric keypad is essential—the numbers across the top of the keyboard will not work.

If your keyboard does not have a numeric keypad, or if you are using a laptop without one, you can enable Num Lock and use the number keys that double as arrow keys. On some laptops, you may need to hold Fn (Function) while typing the Alt code. If Alt codes do not work in your program, try the AutoCorrect method instead: type two hyphens followed by a space or punctuation mark, and many programs will convert it to an em dash automatically.

Creating an em dash on Mac

On Mac, press Option + Shift + Hyphen (the hyphen is the key to the right of 0 at the top of the keyboard). This keyboard shortcut works across most Mac applications, including Mail, Pages, Google Docs, and web browsers. The combination is consistent and faster than looking up codes.

If you forget the shortcut, you can also use the AutoCorrect method in many Mac programs: type two hyphens with a space after them, and the software will convert it. In some older Mac applications, Option + Hyphen creates an en dash instead of an em dash, so the three-key combination is more reliable.

Using AutoCorrect in Word and Google Docs

Both Microsoft Word and Google Docs have built-in AutoCorrect features that convert two hyphens into an em dash automatically. Type two hyphens (--), then add a space or punctuation mark after them. The software detects the pattern and replaces the hyphens with an em dash. This method works on Windows, Mac, and even in the web versions of both programs.

If AutoCorrect is not working, check your settings. In Microsoft Word, go to File > Options > Proofing > AutoCorrect Options, then look for the "Replace" tab. Make sure the option to replace hyphens with dashes is checked. In Google Docs, AutoCorrect is always on by default, but you can customize it under Tools > Preferences. If you type two hyphens and nothing happens, your document settings may have AutoCorrect disabled.

Creating an em dash on phones and tablets

On iPhones and iPads, open the keyboard and switch to the symbols view (usually by tapping the .?123 key). Look for the em dash in the punctuation section—it may be on the first or second symbols screen. If you do not see it immediately, swipe left to find more symbols. Alternatively, hold down the hyphen key for a second or two, and a menu of dash options may appear, including the em dash.

On Android phones, the process varies by keyboard app. In the default Google Keyboard, tap the .?123 key to access symbols, then look for the em dash. If it is not visible, tap the =\< key to access more symbols. Some Android keyboards require you to hold down the hyphen key to see dash options. Third-party keyboard apps like Gboard, SwiftKey, or Microsoft Keyboard may have different layouts, so check the symbols section of whichever keyboard you use.

Using HTML code for em dashes

If you are writing HTML code for a website or editing raw HTML, you can insert an em dash using the code &mdash; (with the ampersand at the start and semicolon at the end). This code works in all web browsers and ensures the em dash displays correctly regardless of the user's device or font settings. For example: "She wanted one thing&mdash;to leave early" will display as "She wanted one thing—to leave early" on the web page.

Some content management systems and website builders handle em dashes automatically, so you may not need to use HTML code at all. If you are copying text from another source into a website editor, check whether the em dash transferred correctly. Some systems convert special characters during the paste process, which can turn an em dash into a regular hyphen or a question mark.

Troubleshooting em dash problems

If your em dash is not appearing, first check that you are using the correct method for your device and software. Alt codes only work on Windows with a numeric keypad. The Mac shortcut (Option + Shift + Hyphen) only works on Mac. If you copied text from another document, the em dash may have been converted to a hyphen or en dash during the transfer—retype it using your device's method instead.

Some programs and websites strip out special characters for security reasons. If an em dash disappears after you save or submit your text, the program may not support it. In that case, use two hyphens (--) as a substitute, which most readers will understand. If you are having trouble in a specific program, check its help documentation or settings for text formatting options.

Frequently Asked Questions

What is the difference between an em dash, en dash, and hyphen?

A hyphen (-) is the shortest and is used to join words or break words at line ends. An en dash (–) is medium-length and is used in ranges like "2020–2024" or to show a connection between two things. An em dash (—) is the longest and is used for pauses, emphasis, or to set off phrases in a sentence. Each has a different purpose in writing.

Can I just type two hyphens instead of an em dash?

Many readers will accept two hyphens (--) as a substitute for an em dash, especially in informal writing or email. However, in formal writing, published work, or professional documents, an actual em dash looks better and is the correct choice. Most word processors will convert two hyphens to an em dash automatically, so there is no reason not to use the real character.

Why does my em dash look like a question mark or a box?

This usually means the font or program does not support the em dash character, or the character was corrupted during copying or pasting. Try retyping the em dash using your device's keyboard shortcut instead of copying it. If the problem continues, check that your font supports special characters, or switch to a more common font like Arial or Times New Roman.

Is there a keyboard shortcut for em dash on Chromebook?

Chromebooks do not have a built-in keyboard shortcut for em dash. Instead, use the AutoCorrect method: type two hyphens followed by a space in Google Docs or Gmail, and the software will convert it to an em dash. If you are using a different program on Chromebook, you may need to access the character through the on-screen symbols menu or copy and paste an em dash from another source.

Can I create an em dash in a text message or social media post?

Yes, on most phones you can access the em dash through the symbols keyboard. On iPhone, tap .?123, then look for the em dash in the punctuation section. On Android, do the same with your keyboard app. Some social media platforms and messaging apps may convert or remove the em dash, so test it first. If it does not work, two hyphens (--) are usually accepted as a substitute.