Should You Put Spaces Around a Hyphen?
When a hyphen takes spaces, when it shouldn't, and how hyphens, en dashes and em dashes behave in style rules, copy/paste, search and screen readers.
Usually, no. A hyphen joins words or word parts, so it normally sits with no space on either side: well-known, re-enter, mother-in-law. When writers put spaces around a hyphen, they usually mean a dash, which marks a break in a sentence. The real decision is which character to use and how a spacing tool or find-and-replace pass changes the text that is actually stored.
The short answer
- Hyphen (-): no spaces in compounds and word breaks, as in cost-effective or co-author.
- Suspended hyphen: a space follows the hyphen when the second half of a compound is left off, as in short- and long-term plans.
- En dash (–): unspaced in ranges such as pages 10–20 or 2019–2024. Many British publishers also use a spaced en dash as a sentence break.
- Em dash (—): American style guides differ. Chicago style closes it up (word—word). AP style puts a space on each side (word — word).
- A spaced hyphen (word - word) is a plain-keyboard stand-in for a dash. It is common in informal text, but edited copy generally replaces it with an en or em dash.
Is converting spaced hyphens right for your use?
Converting a spaced hyphen to a proper dash makes published prose look finished and removes ambiguity between joining and breaking. The main tradeoff is that you replace an ASCII character with a different Unicode character. That character can behave differently in search, code, data files and some input systems. Converting is a good choice for articles, documents, books and other body text set by a person or a publishing system that handles Unicode.
Keep the plain hyphen-minus in anything a machine parses. This includes command-line options, code, URLs and file names, CSV or other data fields, product codes, phone numbers, and text whose destination you cannot check. In those settings, a typographic dash can break a command or make the text impossible to find.
What a hyphen or dash tool actually changes
Several characters look alike but are stored as different code points. A tool that ‘fixes dashes’ swaps one stored character for another, and it may also add, remove or replace the spaces next to it. This is a change to the text itself, not to how it is displayed. The original sequence comes back only if you reverse the substitution.
U+002D - HYPHEN-MINUS (keyboard hyphen; used in code and data)
U+2010 ‐ HYPHEN (typographic hyphen; rarely needed)
U+2011 ‑ NON-BREAKING HYPHEN (prevents a line break at the hyphen)
U+00AD SOFT HYPHEN (invisible unless a word breaks there)
U+2013 – EN DASH (ranges; spaced sentence breaks in some styles)
U+2014 — EM DASH (sentence breaks)
U+2212 − MINUS SIGN (mathematics)
U+0020 SPACE
U+00A0 NO-BREAK SPACE
U+2009 THIN SPACE
U+200A HAIR SPACE
Some changes affect only the display. The CSS hyphens property, for example, lets a browser hyphenate words at line ends without adding any hyphen to the stored text. A soft hyphen is stored in the text but normally stays hidden. Narrow spacing around a dash can be done in two ways. Stored thin or hair spaces travel with the text. Spacing added through CSS letter-spacing or margins does not survive copying.
Watch out for the word ‘font’. Using a different typeface makes a hyphen look longer or shorter, but the character underneath stays the same. Swapping to a dash is a character substitution. Choosing a font is a presentation choice.
| Change | Stored text altered? | Survives plain copy/paste? |
| Hyphen-minus replaced with en or em dash | Yes | Yes, as the new character |
| Spaces added or removed around a dash | Yes | Yes |
| Regular space replaced with no-break or thin space | Yes | Usually kept, but some destinations may normalize it |
| Non-breaking or soft hyphen inserted | Yes | Kept as an invisible or special character |
| CSS hyphenation or letter-spacing | No | No |
| Different font making a hyphen look like a dash | No | No |
Will the result stay usable after copying or sharing?
Substituted dashes copy as themselves, so the punctuation you chose generally carries over to any destination that supports Unicode. Most remaining problems come from the fact that the character is no longer a hyphen-minus.
- Code and commands: a dash pasted in place of a hyphen in a command-line option or a minus sign is not interpreted as one, so the command will fail or behave differently.
- Search and find: a search for a hyphen-minus may not match an en dash or a non-breaking hyphen. Whether it matches depends on the search tool and how it normalizes punctuation, so test the specific tool you rely on.
- Editing and autocorrect: some word processors automatically turn a spaced hyphen into a dash as you type. Pasted text can therefore end up different from what you typed, and the result may not match your chosen style.
- Line breaks: lines can usually break after an ordinary hyphen. A non-breaking hyphen keeps a compound such as a phone-style code on one line. A no-break space before a spaced dash stops a line from starting with the dash.
- Invisible characters: soft hyphens, no-break spaces and thin spaces are hard to see while editing. They can cause confusing mismatches in comparisons, validation or later find-and-replace passes.
Accessibility is the least settled area. Screen readers can announce, pause on or skip dashes and hyphens, depending on the software and the user's punctuation verbosity settings. No documentation or scoped testing for a specific screen reader was available for this review, so no claim is made about how any particular product reads a spaced hyphen versus an en or em dash. The safe course is to use dashes for their conventional meanings. Do not rely on unusual spacing or decorative dash characters to carry meaning. If the reading matters, test it with the assistive technology your audience actually uses.
When to keep the plain hyphen
Keep an unspaced hyphen-minus for compounds in any context. Use the plain keyboard character in technical, data or uncertain destinations, even where a dash would look better. For edited prose, convert spaced hyphens to the dash and spacing your style guide calls for, closed em dashes for Chicago or spaced em dashes for AP, and apply the choice consistently. Before publishing, check a sample of the converted text in the destination where it will appear. One successful rendering does not prove it will work everywhere else.