Back to Tools

Markdown Formatter

Beautify and standardize your Markdown files for better readability

🧼 Clean Space 📋 List Sync 📐 Pretty Print
Input Markdown

Tidy inconsistent Markdown before it goes into a repo

Markdown written by several people, or exported from another tool, tends to drift: some bullets use dashes and others use asterisks, headings lack the space after the hash marks, and stray double spaces creep in. This formatter runs a set of small clean-ups over pasted text so files look consistent and diffs stay quiet.

Formatting steps

  1. Paste your text into Input Markdown. Sample loads a deliberately messy document; Clear empties the box.
  2. Choose a List Bullet: dash, asterisk or plus.
  3. Tick or untick Double break between blocks and Trim trailing spaces. Both are on by default.
  4. Click Beautify Markdown, then use Copy Result or the .md button, which saves formatted.md.

What the formatter really changes

  • A heading such as #Title becomes # Title, so it renders as a heading in strict parsers.
  • List lines beginning with *, - or + followed by a space are rewritten to the marker you chose, keeping their original indentation.
  • Runs of two or more spaces inside a line collapse to a single space.
  • With trailing-space trimming on, spaces at the end of each line are removed.
  • With block spacing on, a blank line is inserted between a heading or table row and the neighbouring text, and any run of three or more blank lines is reduced to one blank line.

Common situations

  • Normalising a README before opening a pull request.
  • Cleaning up notes exported from a wiki or note-taking app.
  • Making bullet style consistent across a documentation folder.
  • Fixing generated Markdown from an AI or scraper that skipped blank lines.

Limitations you should know

The Header Style menu offers ATX and Setext, but the formatting routine does not read it, so headings stay in hash style either way. Every line is trimmed on both sides, which means indented code blocks and nested paragraph content lose their leading spaces, while list lines keep theirs. Runs of spaces are collapsed everywhere, including inside fenced code and table cells, so check code samples afterwards. A list marker with no space after it, like -Item, is not recognised as a list. Trailing double spaces used for hard line breaks are removed when trimming is on. Review the output before replacing the original. Processing runs in your browser.

Related Tools


Frequently Asked Questions

Does the Header Style option convert headings to Setext?
No. The menu lists ATX and Setext, but the current formatting logic does not use it, so headings remain hash-style. It only fixes a missing space after the hash marks, such as changing #Title to # Title.
Will it damage my code blocks?
It can. Lines are trimmed and runs of spaces are collapsed everywhere, including inside fenced blocks, so indentation in code samples can be lost. Review any code after formatting or restore those sections from your original.
What does Double break between blocks do?
When ticked, it inserts a blank line between a heading or table row and the adjacent text if none exists. Runs of three or more blank lines are reduced to a single blank line in every case.
Why was my hard line break removed?
Markdown often uses two trailing spaces to force a line break. With Trim trailing spaces on, those are removed. Untick the option, or use a backslash or br tag for line breaks instead.
How are nested lists handled?
List lines keep their leading indentation and only the marker character is replaced with your choice. Other indented content is trimmed, so continuation paragraphs under a list item may need their indentation restored manually.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.