SmartMarkdown

Markdown Cleaner

Strip the noise that exporters and copy-paste leave behind: smart quotes, invisible zero-width characters, non-breaking spaces, HTML comments, empty links, and stray blank lines. Pick exactly what to clean, with a live preview.

Paste Markdown to Clean

Cleaned Markdown

# Pasted from a "fancy" editor

This text has  "smart quotes", 'curly apostrophes', an em-dash, and  non‑breaking   spaces.

A broken empty link click here and an  with no text.

Some empty bold and trailing spaces here →

Too many blank lines above this paragraph.

9 lines changed · 71 characters removed.

Reviewers

Sarah Chen, SEO Content Strategist

Based on 5 sources
178 people find this tool helpful

What This Tool Does

Markdown that comes out of word processors, web pages, Notion, or AI chat exports is often littered with invisible junk: curly quotes, non-breaking spaces, zero-width characters, and HTML comments. This cleaner removes that noise so you get plain, portable Markdown that diffs cleanly, copies reliably, and renders the same everywhere.

What It Removes

  • Typographic punctuation: smart quotes, curly apostrophes, em/en dashes, ellipses → ASCII equivalents.
  • Whitespace gremlins: non-breaking spaces, trailing spaces, and runs of blank lines.
  • Invisible characters: zero-width spaces, joiners, and BOM marks.
  • Markup leftovers: HTML comments, empty bold/italic, and empty links.
  • Optional fixes: over-escaped punctuation, <br> to newlines, and emoji variation selectors.

Invisible Characters

The most insidious artifacts are the ones you can't see. A zero-width space inside a word breaks search and code; a non-breaking space looks normal but isn't a real space. The cleaner detects and removes these so your Markdown behaves exactly as it appears.

Code-Block Safety

Cleaning rules that could damage code — quote straightening, space collapsing, emphasis removal — explicitly skip fenced and inline code spans. Your snippets pass through untouched while the surrounding prose is cleaned.

Common Use Cases

  • AI exports: clean Markdown copied out of ChatGPT or Claude.
  • Word/Notion paste: remove smart quotes and hidden characters.
  • Web scrapes: strip HTML comments and invisible markup.
  • Pre-commit hygiene: ensure committed Markdown is plain and portable.

Tips

  • Leave smart-quote conversion off if you intentionally want typographic punctuation.
  • Run the cleaner before the Markdown Formatter for the tidiest result.
  • Check the footer to see how many lines changed and characters were removed.

FAQ

Frequently Asked Questions