Markdown Prettifier & Cleanup
Paste messy Markdown to instantly clean up formatting with consistent headings, list indentation, and proper spacing
Paste messy Markdown with mixed heading styles, inconsistent list markers, and ugly spacing — get clean, standardized output in one click. Pick your preferred heading format, list character, and indentation depth, then hit Prettify or Compact. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool splits your Markdown line by line, detects headings, lists, code blocks, blockquotes, and front matter. It then normalizes each element — fixing heading syntax, unifying list markers, adjusting indentation depth, and inserting consistent blank lines between sections. Code fences and front matter are left untouched. Hit Compact instead if you want the opposite: minimal whitespace with no double-blanks.
Examples
Fixing Inconsistent Heading Styles
Someone mixed ATX and setext headings in the same doc. Classic.
My Title
========
##Setup Instructions
###Step One
# My Title
## Setup Instructions
### Step One
Cleaning Up a Messy Bullet List
You copied list items from multiple files. Some use dashes, some use asterisks, and the indentation is all over the place.
* Item one
- Item two
* Sub-item A
- Sub-sub-item
+ Item three
- Item one
- Item two
- Sub-item A
- Sub-sub-item
- Item three
Stripping Excessive Blank Lines from a README
After merging sections from different contributors, a README ended up with 4-5 blank lines between paragraphs. Compact mode squashes all of them down to one.
# API Reference
## Authentication
### Tokens
# API Reference
## Authentication
### Tokens
Who Uses This
Cleaning up README files and CONTRIBUTING.md before pushing to GitHub.
Standardizing heading levels and list styles across multi-author documentation.
Formatting Markdown notes and assignments so they render correctly on submission platforms.
Getting blog post drafts consistent before pasting into a CMS or static site generator.
Common Mistakes
Writing ##Title instead of ## Title means most Markdown parsers won't recognize it as a heading at all. The prettifier adds the space automatically.
Starting with - then switching to * mid-list confuses some renderers and creates inconsistent output. Pick one marker in the options and the tool handles the rest.
If your Markdown already has code blocks, the tool detects fenced code (triple backticks or tildes) and leaves everything inside them alone. But if you paste only the inner code without the fences, it will get formatted as regular Markdown.
Technical Details
- Processing: 100% client-side — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Limit: No hard cap, but very large files (50,000+ lines) may slow down older machines
- Preserves: YAML front matter, fenced code blocks, blockquotes, inline formatting
- Output: Copy to clipboard or download as
.mdfile
Frequently Asked Questions
What does a Markdown prettifier actually change?
It fixes spacing around headings, normalizes list markers to a single character, adjusts indentation on nested lists, and removes excessive blank lines. Your actual words, links, and images stay exactly the same — only the whitespace and syntax markers get touched.
Will it break my code blocks?
No. The prettifier detects fenced code blocks (triple backticks or tildes) and skips everything between the opening and closing fence. Same goes for YAML front matter between --- delimiters. Inline code with single backticks is also left alone.
What is the difference between Prettify and Compact?
Prettify adds proper spacing — blank lines before headings, consistent indentation, normalized markers. Compact does the opposite: it strips all double-blank lines down to single blanks and removes trailing whitespace. Use Prettify for readability, Compact for smaller file size.
Is my Markdown stored or uploaded anywhere?
Not at all. The entire tool runs in JavaScript inside your browser. Nothing is sent to a server. You can disconnect from the internet and it still works. Close the tab and your data disappears completely.
Can I use setext-style headings instead of ATX?
Yes. Open the options panel and switch Heading Style to setext. That converts level-1 headings to underlines with = and level-2 headings to underlines with -. Levels 3 through 6 stay as ATX (###) since setext only supports two levels.