The EM dash (—) is a punctuation mark that is used is the place of commas, parentheses or colons. The EM dash is sometimes confused with the EN dash (–) or the hyphen (-), but it serves a separate purpose.
Use the EM dash in place of commas to make the sentence easier to read. Longer sentences may contain several commas and replacing a pair of commas around a clause may make the sentence clearer. Similarly, a pair of EM dashes can take the place of a pair of parentheses when you want to give the parenthetical content more emphasis. If the parentheses are at the end of a sentence, use just one EM dash. The EM dash also serves to replace a colon as a less formal way to emphasize the end of a sentence.
Generally, when used to replace other punctuation marks, the EM dash provides greater emphasis and is less formal. You can show that parts of words are missing with two EM dashes. In this case, punctuation around the EM dash is placed according to normal grammar guidelines. Further, depending on the style guide used, EM dashes may have no spaces or a single space on either side.