Markdown Prettifier
Clean up trailing whitespace and extra blank lines in Markdown files for consistency. Fast, free, and fully client-side.
How the Markdown Prettifier Works
Removes spaces and tabs at the end of every line and collapses runs of three or more line breaks into a single blank line. The cleanup applies to the whole text, including fenced code blocks. The Markdown is not rendered or parsed. Runs in your browser and the text is never uploaded.
Usage Example
Tidies a README draft that picked up stray trailing spaces and extra blank lines from copy and paste.
Frequently Asked Questions
Does the cleanup change the contents of code blocks?
Yes. Trailing whitespace and extra blank lines are removed everywhere, including inside fenced code blocks, and two trailing spaces that create a hard line break are removed too. Check code samples after cleaning.
Does it check heading, list, or link syntax?
No. The document is not rendered or validated. Only whitespace at the end of lines and the count of consecutive blank lines are changed.
Is indentation changed?
Leading indentation is not touched, so nested list items and indented code remain as written. Only whitespace at the end of each line is removed.
