# Em-dash & Typographic Purifier

Convert AI-typical plain ASCII into proper typography: -- and --- become en/em dashes, straight quotes become curly/smart quotes (locale-aware), ... becomes a single ellipsis …, spaced dashes are tightened, and repeated spaces collapse — while fenced ``` code blocks and `inline` code are left untouched.

> Canonical page: https://elysiatools.com/en/tools/em-dash-and-typographic-purifier

- **Category:** Text Processing

- **Keywords:** em dash, en dash, typography, smart quotes, curly quotes, ellipsis, hyphen, apostrophe, guillemets, AI text, punctuation, typesetting, publishing

## Overview

Paste any text and the purifier fixes the typography that AI-generated and hastily-typed prose gets wrong:

1. **Dashes** — `---` becomes an em dash (—), `--` becomes an en dash (–), and number ranges like `1990-1992` become `1990–1992`. Spaced ` — ` is tightened so the dash hugs the words.
2. **Smart quotes** — straight `" "` and `' '` become curly, locale-aware guillemets/quotes. Apostrophes in contractions are handled.
3. **Ellipsis** — `...` and `. . .` collapse into a single ellipsis character (…).
4. **Whitespace** — runs of spaces/tabs collapse to one (newlines preserved).
5. **Code-safe** — fenced ```code blocks``` and `inline code` spans are detected and never modified.

Runs fully offline and deterministically.

## Inputs

- **Text to purify** (textarea): Paste text with -- dashes, "straight quotes", and ... ellipses…
- **Locale** (select)
- **Conversions** (select)
- **Fix spaced dashes ( — )** (checkbox)
- **Multiple spaces to single** (checkbox)
- **Preserve code blocks ``` and `inline`** (checkbox)

## When to use

- When preparing AI-generated drafts or raw transcripts for professional publication or typesetting.
- When you need to convert straight quotes to locale-specific curly quotes or guillemets automatically.
- When cleaning up double hyphens, spaced dashes, and multiple consecutive spaces in markdown files without breaking code syntax.

## How it works

- Paste your raw text into the input area and select your target language locale to determine the correct quotation style.
- Choose whether to apply all conversions or restrict the purification to dashes, quotes, or ellipses only.
- Toggle options to collapse multiple spaces, tighten spaced dashes, or preserve code blocks and inline code.
- Review the instantly generated output containing proper typographic characters ready for copy-pasting.

## Use cases

- Polishing blog posts and articles generated by LLMs that use straight quotes and double hyphens.
- Formatting localized copy for French, German, or Spanish websites using correct regional quotation marks.
- Cleaning up copy-pasted transcripts containing messy spacing, triple-dot ellipses, and inconsistent dashes.

## Frequently asked questions

### Does this tool modify code blocks?

No, if the preserve code option is enabled, fenced code blocks and inline code remain completely untouched.

### Which languages are supported for smart quotes?

It supports English, Chinese, Japanese, Spanish, French, German, Russian, and Portuguese, applying the correct local quotation marks for each.

### What is the difference between en-dashes and em-dashes here?

Double hyphens (--) convert to en-dashes (–) or em-dashes (—) depending on context, and triple hyphens (---) convert to em-dashes.

### Does the tool run online or offline?

It runs fully offline and deterministically in your browser, ensuring your text data remains private.

### Can I choose to only fix quotes and ignore dashes?

Yes, you can set the conversions option to 'Quotes only' to bypass dash and ellipsis transformations.

## Related tools

- [Twitter / X Thread Splitter](https://elysiatools.com/en/tools/twitter-thread-splitter): Paste a long text and split it into a numbered X thread that respects the 280-character limit. Splits on word/sentence/paragraph boundaries, auto-adds 1/N numbering, weighs CJK and full-width characters correctly, counts URLs as 23 characters, and shows a live X-style preview card for each tweet with a character meter.
- [Unicode → ASCII Transliterator](https://elysiatools.com/en/tools/unicode-to-ascii-transliterator): Convert any Unicode text to plain ASCII: strip accents (é→e, ñ→n), romanize Cyrillic/Greek, and transliterate Chinese to pinyin (北京→Bei Jing). Drops emojis and symbols that have no ASCII equivalent.
- [ASCII Art Generator](https://elysiatools.com/en/tools/ascii-art-generator): Convert text to ASCII art using various fonts and styles
- [Indented List to ASCII Tree](https://elysiatools.com/en/tools/ascii-tree-from-indented-list): Convert a 2-space / 4-space / Tab indented hierarchical list (Markdown bullets, -, *, 1. prefixes optional) into a copyable ASCII directory tree. Two styles: Unicode box-drawing (├──└──│) for GitHub/Discord and classic ASCII (|--\--|) for plain text. Toggles for full guide lines, trailing spaces, and bracketed leaf nodes like docs/\[api.md\].
- [Consistent Pseudonym Text Anonymizer](https://elysiatools.com/en/tools/consistent-pseudonym-text-anonymizer): Detect common PII in text and replace repeated entities with stable, auditable pseudonyms without sending the text to a model.
- [Fancy Text Generator](https://elysiatools.com/en/tools/fancy-text-generator): Convert text into every decorative Unicode style at once and compare them side-by-side — small caps, bold, italic, script, fraktur, double-struck, monospace, circled, fullwidth, strikethrough, underline, upside-down.
- [Fullwidth to Halfwidth Converter](https://elysiatools.com/en/tools/fullwidth-to-halfwidth): Convert fullwidth characters to halfwidth characters for proper text formatting
- [Leet Speak Converter](https://elysiatools.com/en/tools/leet-speak-converter): Convert text to and from leet speak (1337). Encode with Basic, Full, or Caps styles, or decode leet back to plain text.

## Samples

- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Special Characters Samples](https://elysiatools.com/en/samples/text-special-characters-samples): Sample text files with various special characters, punctuation, and symbols for testing non-alphanumeric character removal
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion

## Related content

- [Editorial Copy Review and Brand Voice Tools](https://elysiatools.com/en/hubs/editorial-copy-review-and-brand-voice): Compare headline, readability, tone, typography, whitespace, and Markdown quality tools in one hub for editorial review before publishing.
- [Text Case, Encoding, and Normalization Conversion Tools](https://elysiatools.com/en/hubs/text-convert): Compare text case conversion, character-width conversion, encoding conversion, quoted-printable handling, and inline text normalization tools in one hub.
- [Text Tools](https://elysiatools.com/en/hubs/text-utility): Explore 33 text tools for utility workflows and compare closely related utilities quickly.
- [Text Analysis, Readability, and Content Inspection Tools](https://elysiatools.com/en/hubs/text-analyze): Compare text statistics, language detection, readability scoring, sentiment analysis, moderation review, and pattern analysis tools in one hub.
