Skip to content

Markdown Cleaner

Tidy Markdown source without changing a single thing about how it renders.

Runs in your browserNo account neededFree
Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the markdown cleaner

  1. Paste your Markdown.
  2. Choose which tidying to apply.
  3. Copy the cleaned source back.

About this tool

Every transform here is chosen because it leaves the rendered result identical. This cleans the source; it does not edit the document. Bullets become consistent, heading syntax is normalised, repeated blank lines collapse, and trailing whitespace goes.

Two exceptions are deliberate and matter. Two or more trailing spaces are a hard line break in Markdown, so they are normalised to exactly two rather than stripped — removing them would silently change the output, which is precisely what this tool promises not to do. And everything inside a code fence is left untouched, because indentation and trailing spaces in code are content rather than formatting.

The reason to bother is version control. Inconsistent bullets and stray whitespace produce diff noise that hides the real change, and a document edited by several people accumulates all three styles of bullet within a few months.

Common uses

  • Normalising a document edited by several people.
  • Cutting whitespace noise out of a diff.
  • Tidying Markdown exported from another tool.

Frequently asked questions

Will this change how my document looks?
No. Every transform is chosen because the rendered output stays identical — including preserving the two trailing spaces that mean a hard line break.
Is code left alone?
Yes. Anything inside a code fence is untouched, since whitespace there is content rather than formatting.
Why does bullet style matter?
Only for diffs and readability. Asterisks, plus signs and hyphens all render identically, but a document using all three produces noisy diffs.

Related tools