M Hyphen: What the Em Dash Is and How It Differs from a Hyphen
The "m hyphen" is the em dash. Learn how it differs from the hyphen and en dash, what swapping them changes, and when plain hyphens are the safer choice.
People who search for an "m hyphen" are usually looking for the em dash (—), the long dash used to set off a phrase or mark a break in a sentence. Despite the nickname, it is not a hyphen. The hyphen (-), the en dash (–) and the em dash (—) are three separate characters with separate jobs. Replacing one with another, whether by hand, through autocorrect or with a conversion tool, changes the stored text, not just its appearance. This review explains what that means for meaning, readability and portability.
Is converting hyphens to dashes right for your use?
For edited prose that will be read by people, such as articles, books, reports and newsletters, using true en and em dashes is generally worthwhile. The main benefit is clarity: each mark signals a different relationship between words, and readers of polished text expect the distinction. The deciding tradeoff is portability. Dashes are non-ASCII characters, so they can break or display incorrectly in code, command lines, filenames, URL slugs, legacy systems and some data pipelines. Plain hyphens are preferable wherever text will be parsed by software, typed back in by users, or moved through systems whose encoding support is unknown.
What the longer hyphen is called
The longest common dash in writing is the em dash. Its name comes from traditional typesetting, where its width matched the em, a unit roughly equal to the width of a capital M in the typeface. The medium dash is the en dash, about half as wide and named after the letter N. The hyphen is the shortest of the three. The exact lengths depend on the font. In some typefaces the hyphen and en dash look similar on screen, which is one reason the marks get confused.
Hyphen, en dash and em dash compared
| Mark | Character | Unicode code point | Typical job | Example |
| Hyphen (hyphen-minus) | - | U+002D | Joins words and parts of words; breaks words at line ends | well-known, re-enter |
| En dash | – | U+2013 | Ranges and connections between items | pages 10–20, the Boston–Chicago route |
| Em dash | — | U+2014 | Sets off an aside, interruption or emphatic break | The result—once checked—was clear. |
What a hyphen-to-dash conversion actually changes
Swapping a hyphen for an en or em dash is a Unicode character substitution. The stored code point changes from U+002D to U+2013 or U+2014, so the text is different at the data level. That is unlike a font or style change, which alters only how the same characters are drawn. Choosing a different font cannot turn a hyphen into a dash, and CSS styling in a web page cannot do it either. Only a different character can. Conversely, an HTML entity such as — or — is just another way to write the same em dash character in markup.
The keyboard hyphen is technically the hyphen-minus, a legacy character that does double duty as hyphen and minus sign. Unicode also defines more specific characters that conversion tools may produce, sometimes without the user noticing:
U+002D - HYPHEN-MINUS (keyboard hyphen)
U+2010 ‐ HYPHEN (typographic hyphen)
U+2011 ‑ NON-BREAKING HYPHEN
U+2012 ‒ FIGURE DASH
U+2013 – EN DASH
U+2014 — EM DASH
U+2015 ― HORIZONTAL BAR
U+2212 − MINUS SIGN
These characters can look nearly identical yet behave differently in search, sorting and parsing. If a tool outputs a typographic hyphen (U+2010) or a minus sign (U+2212) where a plain hyphen-minus was expected, the text may look unchanged while no longer matching what other software looks for. Checking the code points of a converted sample, for example with a character inspector or a text editor that displays them, is the reliable way to confirm what a tool did.
Automatic conversion can also change meaning when it guesses wrong. A word processor that turns two hyphens into a dash, or a tool that converts every spaced hyphen into an en dash, may alter a negative number, a command-line option, a phone number or a product code. Review converted text rather than assuming every replacement was intended.
How to use each mark
- Hyphen: compound modifiers before a noun (a long-term plan), some prefixes (re-enter, ex-partner), spelled-out numbers (twenty-one) and word breaks at line ends.
- En dash: number and date ranges (1990–2000, pages 10–20), scores and votes (a 3–2 win), connections between places or parties (the Boston–Chicago route), and joining an open compound to another word (pre–Civil War).
- Em dash: setting off a parenthetical phrase with more emphasis than commas, marking an abrupt break or interruption, and introducing an explanation or list in place of a colon.
Spacing around the em dash depends on the style guide. The Chicago Manual of Style, common in US book publishing, uses no spaces (word—word). AP style, common in US journalism, puts a space on each side (word — word). Either is acceptable if applied consistently. Ranges written with an en dash should not be mixed with "from" or "between": write "from 1990 to 2000" or "1990–2000," not "from 1990–2000."
Will dashes stay readable after copying or sharing?
In environments that handle Unicode, which includes current browsers, operating systems and mainstream office and messaging software, en and em dashes are ordinary characters and generally copy and paste intact. The risk comes from encoding mismatches. When UTF-8 text is read as Windows-1252, an em dash appears as "—" and an en dash as "–". Systems limited to ASCII may replace the character with a question mark or drop it. If the destination is an older database, an email system, a CSV export or a third-party integration of unknown configuration, test a sample before converting a whole document.
Code and technical text are where dashes cause the most damage. Command-line options must use hyphen-minus characters: an autocorrected em dash in place of a double hyphen produces an option that the program will not recognize. The same applies to arithmetic in code and spreadsheets, where the minus must be a hyphen-minus unless the software explicitly accepts U+2212. Code blocks, configuration files, filenames and URL slugs should keep plain hyphens.
Search and editing are also affected. A find command for "-" will not match "–" or "—" in many editors, so a document with mixed marks is harder to search and clean up. How individual web search engines treat dashes versus hyphens is not established by the material available for this review, so do not assume they are interchangeable for search or indexing.
For accessibility, dashes are standard punctuation rather than decorative symbols, so they are a far safer choice than styled Unicode letters. Screen readers differ in how they announce them: depending on the product and its punctuation verbosity setting, a dash may be spoken by name, rendered as a pause or skipped. No tested results for specific screen readers were available here. To be safe, do not let a dash carry meaning on its own. For example, write "10 to 20" where a range must be unambiguous when read aloud, and avoid long runs of dashes as visual dividers, which some assistive technology may read out character by character.
When plain hyphens are the better choice
- Source code, scripts, command-line examples and configuration files.
- Filenames, URL slugs, usernames, identifiers and product codes.
- Data fields that other software will parse, match or sort.
- Systems whose character encoding you cannot confirm.
- Text that readers are likely to retype rather than copy, where a double hyphen (--) is a widely understood stand-in for an em dash.
Typing en and em dashes directly
- Windows: Alt+0151 for an em dash and Alt+0150 for an en dash, typed on the numeric keypad.
- macOS: Option+Shift+Hyphen for an em dash and Option+Hyphen for an en dash.
- Linux with a Compose key: Compose, hyphen, hyphen, hyphen for an em dash; Compose, hyphen, hyphen, period for an en dash.
- HTML: — or — for an em dash; – or – for an en dash.
- Word processors: many can replace two hyphens with a dash as you type; check the autocorrect settings so it does not fire inside code or numbers.
Limits of this review
This guidance rests on the Unicode definitions of these characters and widely documented style conventions. It does not include tested results for any particular conversion tool, publishing platform, messaging app or screen reader. Those behaviors can vary by version and settings, so a successful rendering in one place does not guarantee the same result elsewhere. Before relying on converted dashes in an important destination, check a sample there.