Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Markdown Prettifier & Cleanup

Paste messy Markdown to instantly clean up formatting with consistent headings, list indentation, and proper spacing

Your files never leave your browser
Input0 chars, 0 lines
Output0 chars, 0 lines
Ready·

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

Paste Raw Markdown
→
Parse & Reformat
→
Copy Clean Output

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.

INPUT
My Title ======== ##Setup Instructions ###Step One
OUTPUT
# 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.

INPUT
* Item one - Item two * Sub-item A - Sub-sub-item + Item three
OUTPUT
- 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.

INPUT
# API Reference ## Authentication ### Tokens
OUTPUT
# API Reference ## Authentication ### Tokens

Who Uses This

👨‍💻 Developers

Cleaning up README files and CONTRIBUTING.md before pushing to GitHub.

📝 Technical Writers

Standardizing heading levels and list styles across multi-author documentation.

🎓 Students

Formatting Markdown notes and assignments so they render correctly on submission platforms.

📢 Content Creators

Getting blog post drafts consistent before pasting into a CMS or static site generator.

Common Mistakes

Missing space after heading hashes

Writing ##Title instead of ## Title means most Markdown parsers won't recognize it as a heading at all. The prettifier adds the space automatically.

Mixing list markers in the same list

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.

Pasting content inside a code fence

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

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.

Share: