Markdown cleaner
Paste Markdown and get it back tidy, or as plain text.
Paste Markdown to see it tidied, or stripped to plain text.
Everything runs in your browser. Nothing is uploaded.
Questions
What does this tool do?
The Markdown cleaner takes messy Markdown and returns it tidy: one bullet style, numbers that count up, heading levels without gaps, a blank line around every block, closed code fences, no trailing spaces. A second view shows the same text with the marks stripped, for pasting where Markdown is not welcome.
What does it fix?
List markers: a dash for bullets, numbers that count up, two spaces per level. Headings: a space after the hashes, no skipped levels, underlined headings turned into hash headings. Blank lines: one at most, and one around headings, lists and code. Trailing spaces removed, underscores turned into asterisks for bold and italic, bold-italic on a whole sentence reduced to bold, and a code fence left open closed.
What does it never touch?
Anything inside a fenced code block, the text of links and images, and what is in table cells. It changes marks, not words.
What does the plain text view strip?
Heading marks, bold and italic marks, list markers, block quotes, horizontal rules and code fences. The text of links and images stays, table cells stay two spaces apart, and the code inside fences stays as text.
Which Markdown flavour?
CommonMark, the flavour GitHub, most editors and static site generators read: dashes for bullets, hash headings, asterisks for emphasis, backtick fences.
Does it remove every trailing space?
All but the two that mark a hard line break in CommonMark: those stay, as exactly two.
