Hyphen vs. En Dash vs. Em Dash
Hyphen, en dash or em dash? Learn what each mark does, what changes when you convert between them, and whether the result will survive copy, code and screen readers.
A hyphen, an en dash and an em dash look alike, but they are three separate characters with separate jobs. Swapping one for another, whether by hand, with find-and-replace or with a converter, can change what a sentence means. It can also decide whether the text works at all where you paste it.
Is a dash the same as a hyphen?
No. The hyphen is the short mark on a standard keyboard, and it joins things: words, prefixes and parts of compound numbers. Dashes are longer marks that separate or connect larger units. The en dash is roughly the width of a capital N and mostly marks ranges and connections. The em dash is roughly the width of a capital M and marks a break in a sentence. Each is a distinct character in Unicode, not a longer or shorter version of the same character.
The three marks at a glance
| Mark | Character | Unicode | Main job | Example |
| Hyphen | - | U+002D (hyphen-minus) | Joins words and word parts | a well-known author, twenty-one, re-sign a contract |
| En dash | – | U+2013 | Ranges, connections, scores | 2019–2024, pages 12–18, a 5–3 vote, the Chicago–Denver route |
| Em dash | — | U+2014 | Breaks, asides, emphasis | The result—surprisingly—held up. |
When to use a hyphen
- Compound modifiers before a noun: a long-term plan (but: a plan for the long term).
- Prefixes where the hyphen prevents confusion: re-cover a chair versus recover from an illness.
- Spelled-out compound numbers and fractions: forty-two, two-thirds majority.
- Dividing a word at the end of a line.
- Anything technical: code, command-line options, URLs, slugs, filenames and identifiers all expect the plain keyboard hyphen.
When to use an en dash
- Ranges of numbers, dates and times: 9:00–5:00, 1990–2000, chapters 3–7.
- Connections and contrasts between two things: a New York–London flight, the Smith–Jones debate.
- Scores and votes: a 3–1 win.
- Compound adjectives in which one part is already an open compound, in styles that use this convention: a Pulitzer Prize–winning reporter, pre–World War II housing.
Two cautions apply. First, do not combine an en dash with “from” or “between.” Write “from 2019 to 2024” or “2019–2024,” not “from 2019–2024.” Second, US style guides disagree. Chicago style uses en dashes for the cases above. AP style, common in US news writing, generally uses hyphens instead. Follow whichever guide your publication uses.
When to use an em dash
- To set off an aside more strongly than commas would: The budget—already stretched—was cut again.
- To mark an abrupt break or interruption: “I was about to say—” “Don’t.”
- To introduce an explanation or a summary: She had one goal—finish the draft by Friday.
Spacing depends on the style. Chicago sets em dashes closed, with no spaces (word—word). AP puts a space on each side (word — word). Many British publishers use a spaced en dash (word – word) where US writers use an em dash. Pick one convention and apply it consistently. A double hyphen (--) is a common plain-text stand-in for an em dash, but it is not one.
What changes when you convert hyphens to dashes
Converting a hyphen to a dash is character substitution. The underlying text changes from U+002D to U+2013 or U+2014. Styling is a different thing. A font or CSS rule can draw a hyphen wider or narrower, and glyph widths vary from font to font, but the character stays a hyphen. Search, copy and paste, and assistive technology all work with the character itself, not its drawn shape. Styling therefore cannot turn a hyphen into a dash.
Mirror and reverse effects are also unrelated. Dashes have no mirrored form. Reversing the character order of a range wrecks it: “2019–2024” becomes “4202–9102.” In right-to-left scripts, the Unicode bidirectional algorithm treats en and em dashes as direction-neutral, so they take their direction from the surrounding text. The hyphen-minus is classed as a number separator. Because of this, a range written with one mark can display differently from the same range written with the other when it sits next to digits in mixed-direction text.
Automatic conversion does not understand context. A rule that turns every hyphen between digits into an en dash will also change phone numbers (555-0100), ISO dates (2026-10-31), ISBNs, part numbers and postal codes, none of which are ranges. A rule that turns every double hyphen into an em dash will break command-line options. Target specific patterns, then review the changes instead of accepting a blanket replacement.
Will the result work where you paste it?
Copy and paste
Dashes are real characters rather than formatting, so they copy as text. Unicode-aware destinations, such as UTF-8 web pages and modern document formats, normally preserve them. Destinations limited to ASCII or a legacy encoding may show a question mark, a replacement box or garbled sequences such as “–,” which is what a UTF-8 en dash looks like when it is decoded as Windows-1252. If you are unsure about a destination, paste a short sample and check how it appears to the recipient. If dashes do not survive, use the plain-text fallbacks: a hyphen or the word “to” for ranges, and a double hyphen for em dashes.
Code and technical text
Programming languages, shells and configuration files expect the hyphen-minus for minus signs, flags and options. A command copied from a document where “--verbose” turned into “—verbose” will fail or be misread. Keep technical content in code formatting, and turn off automatic dash conversion when writing documentation. Unicode also has a true minus sign (U+2212) for mathematical typesetting, but it belongs in typeset math, not in code.
Search, URLs and data
A search for “1990-2000” will not necessarily find “1990–2000.” Whether a search tool treats the two as equivalent depends on how it normalizes punctuation, so test the tools your readers rely on. Use plain hyphens in URLs, slugs, filenames, database keys and anything a program has to parse. Spreadsheets and import tools may read an en-dash range differently from a hyphenated one. Check a sample before converting a whole dataset.
Screen readers and accessibility
How a screen reader handles a dash usually depends on its punctuation verbosity setting. One setting may announce the dash by name, another may render it as a pause, and another may skip it. That means a range like “12–18” could be heard without a clear “to.” This guide is not based on tests of specific screen readers, so check with the assistive technology your audience uses. Some precautions help regardless. Write “to” or “through” where a range must be unambiguous. Use “versus” or “and” where a connection matters. Avoid decorative runs of dashes as dividers, because they may be read out character by character.
Line breaks
Text can wrap at hyphens and dashes, which can split a range or a hyphenated code across two lines. Unicode provides a non-breaking hyphen (U+2011) to prevent that break. However, font support for it varies, and it will not match an ordinary hyphen in searches or in code. Check the rendering before relying on it.
Using an online converter with sensitive text
A web-based punctuation tool may send your text to a server for processing. Do not paste confidential, personal or unpublished material into one unless you have read the provider’s privacy terms and find them acceptable. Find-and-replace in a local editor does the same substitution without the text leaving your device.
How to type each mark
Mark Unicode HTML named HTML numeric
- U+002D (none) -
– U+2013 – –
— U+2014 — —
On standard US keyboard layouts, macOS produces an en dash with Option+Hyphen and an em dash with Option+Shift+Hyphen. On Windows, holding Alt and typing 0150 or 0151 on the numeric keypad produces the en dash and the em dash. Layouts and system settings vary, so confirm these shortcuts on your own setup. Some word processors can convert typed double hyphens to dashes automatically. Check whether that option is on before writing anything technical.
Choosing by situation
- Joining words, adding a prefix, writing a compound number: hyphen.
- Number, date or time ranges in edited prose: en dash (a hyphen under AP style).
- Connections, scores and votes between two items: en dash.
- An aside, interruption or explanation inside a sentence: em dash.
- Code, commands, URLs, filenames and identifiers: hyphen-minus only.
- A destination with uncertain or ASCII-only encoding: hyphen, “to,” or a double hyphen as plain-text fallbacks.
- Content where a screen reader must convey meaning exactly: words such as “to” or “versus,” or test with the target assistive technology.
Limits of this guide
The character definitions, code points and HTML references above come from the Unicode and HTML standards. Statements about rendering, clipboard behavior, search matching and screen readers describe general mechanisms, not the results of tests on particular apps, devices or converters. Before you rely on a transformation, check it in the exact destination and with the assistive technology your readers use.