The em dash alt code is Alt+0151: hold Alt and type 0151 on the number pad to get —. The en dash, –, is Alt+0150. The rows tell the dashes, the hyphens and the minus signs apart.
Read the full guide
Long dash, short dash, hyphen
The em dash is the long dash symbol: it breaks a sentence, and a pair sets off an aside. The en dash is shorter and generally shows a range of values, as in 10–20. The key on the keyboard types the hyphen-minus, which stands in for hyphen, minus sign and dash alike.
Why the code has four digits
Short Alt codes come from code page 437, which has no dashes. Codes with a leading zero come from code page 1252, where the en dash is 150 and the em dash 151.
Option+Shift+hyphen types — and Option+hyphen types – on the U.S. layout.
With a Compose key, three hyphens give —; two hyphens and a period give –.
Questions and answers
What is the alt code for a dash?
It depends on the dash. The em dash, —, is Alt+0151 and the en dash, –, is Alt+0150, both typed on the number pad with the leading zero. The plain hyphen needs no code: it has a key of its own.
What is the long dash alt code?
Alt+0151. Long dash is an everyday name for the em dash, —, U+2014. Unicode has longer ones, the two-em dash ⸺ and the three-em dash ⸻, and neither has an Alt code.
What is the en dash alt code?
Alt+0150 types –, the en dash, U+2013. In HTML the en dash is – and the em dash is —.
Why does Alt+151 type ù and not a dash?
Without the leading zero the number is read from code page 437, where 151 is ù and 150 is û. Type the zero first: Alt+0151 for — and Alt+0150 for –.
All 26 dashes and hyphens
Start here 7
—Em dashU+2014. The long dash. It breaks a sentence, and a pair sets off an aside. Alt+0151 on a number pad, with the zero; it has no short Alt code.
–En dashU+2013. Shorter than the em dash, and generally used for a range of values, as in 10–20. Alt+0150 on a number pad, with the zero.
-Hyphen-minusU+002D. The one key of the keyboard that serves as hyphen, minus sign and dash. Unicode gives each of those three a character of its own as well.
−Minus signU+2212. The minus sign of arithmetic. − in HTML. It has no Alt code.
‑Non-breaking hyphenU+2011. A hyphen that does not allow a line break, so both halves of the word stay on one line.
---Three hyphensMade of U+002D, U+002D and U+002D. The em dash as three key presses. With a Compose key, Compose and three hyphens type the em dash itself.
--Two hyphensMade of U+002D and U+002D. The typewritten stand-in for an em dash: typographic convention replaces a double hyphen with the real dash.
Show all 26 dashes and hyphens (19 more)
Dashes 7
‒Figure dashU+2012. As wide as a digit. It is used within numbers, such as a phone number set in a column.
―Horizontal barU+2015. Unicode's other name: quotation dash. Its note: long dash introducing quoted text. ― in HTML.
﹘Small em dashU+FE58. Unicode defines it as U+2014 made small.
⁓Swung dashU+2053. Like a lengthened tilde. It separates alternatives or approximates.
⸻Three-em dashU+2E3B. Three ems long. Added in Unicode 6.1 (2012).
⸺Two-em dashU+2E3A. Twice the em dash. Unicode's other name: omission dash. Added in Unicode 6.1 (2012), so an older device may draw an empty box.
〜Wave dashU+301C. A wavy line found in East Asian character sets, where it is used as a dash.
Hyphens 4
-Fullwidth hyphen-minusU+FF0D. The keyboard hyphen in the width of a Chinese or Japanese character: Unicode defines it as U+002D in a wide form.
‐HyphenU+2010. The hyphen and nothing else, where the keyboard character is hyphen and minus in one. ‐ in HTML.
⁃Hyphen bulletU+2043. A bullet for lists in the shape of a hyphen. ⁃ in HTML.
Soft hyphenU+00AD. Cannot be seen. Unicode notes an invisible format character that marks where a word may be hyphenated. Alt+0173.
Minus signs 4
➖Heavy minus signU+2796. A bold minus sign that is drawn as an emoji. Added in Unicode 6.0 (2010).
﹣Small hyphen-minusU+FE63. The keyboard hyphen in a small form: Unicode defines it as U+002D made small.
₋Subscript minusU+208B. A lowered minus, set below the line like a subscript digit.
⁻Superscript minusU+207B. A raised minus, as in a negative power: 10⁻³.
Look-alikes 4
─Box drawings light horizontalU+2500. A line for drawing boxes, not punctuation. Alt+196 on a number pad.
ーKatakana-hiragana prolonged sound markU+30FC. A Japanese mark that lengthens a vowel, not a dash. Unicode cross-refers the em dash to it.
_Low lineU+005F. The underscore, on the keyboard: a line on the baseline, not a dash. Unicode notes it joins to neighbouring copies of itself.
¯MacronU+00AF. A raised line, not a dash. Unicode's other name: overline. Alt+0175.