Markdown Cleaner / Normalizer

Markdown is forgiving — you can use *, -, or + for bullets; # or underline-style for headings; tabs or spaces for indent. The result is inconsistent files. This cleaner normalizes a Markdown document to one canonical style: ATX headings, dash bullets, fenced code blocks, trimmed trailing whitespace, collapsed blank lines, balanced quote markers.

How to use the Markdown Cleaner / Normalizer

Paste Markdown on the left. Toggle the cleanup options. Output updates live. Copy with the button.

Normalizing inconsistent Markdown

Markdown is deliberately lenient: bullets can be *, -, or +; headings can be ATX (## Title) or setext (underlined with ===); code can be indented or fenced; blank lines and trailing spaces accumulate. That flexibility is fine until several people edit the same files and the styles drift, making diffs noisy and the source hard to read.

This cleaner rewrites a document to one consistent style. It can convert setext headings to ATX, normalize every bullet to a dash, trim trailing whitespace, collapse runs of blank lines, and turn indented code into fenced blocks. Each transform is a toggle, so you apply only the ones you want. The rendered output is unchanged — only the source becomes tidy and consistent.

Common use cases

  • Cleaning up contributions — normalize a doc edited by several people into one style.
  • Reducing diff noise — standardize formatting so version-control diffs show real changes.
  • Pre-commit tidying — run a file through before committing to keep the repo consistent.
  • Converting heading styles — switch setext underlines to ATX hashes across a file.
  • Collapsing whitespace — strip trailing spaces and extra blank lines from imported text.

Frequently asked questions

Does cleaning change how the Markdown renders?

No. The transforms only standardize the source — bullet characters, heading style, whitespace, fences — all of which render identically. The visible output is the same; the raw text is just consistent.

What is the difference between ATX and setext headings?

ATX headings start with hash marks (## Title); setext headings underline the text with === for H1 or --- for H2. Setext only reaches two levels, so converting to ATX is usually cleaner and more uniform.

Why normalize bullet characters?

Markdown treats *, -, and + as the same bullet, so mixed markers in one file are purely cosmetic noise. Picking one — commonly the dash — keeps lists tidy and diffs quiet.

Can I choose which cleanups to apply?

Yes. Each normalization is a separate toggle, so you can, for example, trim whitespace and collapse blank lines while leaving indented code blocks untouched.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: