Markdown Formatter

Normalize Markdown syntax: consistent headings and list markers, aligned tables and optional line wrapping for prose.

Loading tool…

About the Markdown Formatter

Markdown allows several spellings for the same thing, and files edited by many people end up mixing them. Prettier's Markdown printer (CommonMark with GitHub-flavoured extensions) picks one: setext headings underlined with === become # headings, bullet markers are unified to -, emphasis uses _ and strong emphasis **, and blank lines are inserted around headings, lists and code blocks where needed.

The most visible improvement is tables: columns are padded so the pipes line up, and alignment markers like :-: are kept. Prose wrap controls paragraphs: Preserve keeps your line breaks, Wrap at width re-flows text to the print width (good for plain-text readers and diffs), and Unwrap puts each paragraph on one line (good for editors with soft wrap).

Fenced code blocks keep their content verbatim. The rendered HTML of the document stays the same, only the source changes. Front matter in --- YAML blocks is preserved. Use the Markdown Preview tool to check the rendered result.

How to use it

  1. Paste Markdown or open a .md file.
  2. Choose a prose wrap mode and print width.
  3. Review headings, lists and tables in the output.
  4. Copy or download the formatted file.

Frequently asked questions

Can this align my Markdown tables?
Yes. Table cells are padded so every column lines up, which makes tables readable in plain text. Very wide tables that exceed the print width are still aligned.
Will formatting change how the Markdown renders?
It should not: Prettier only switches between equivalent syntaxes. If you rely on a renderer quirk, check the preview after formatting.
Why were my * bullets changed to -?
Prettier uses a single bullet style for consistency. Nested lists alternate markers only when needed to keep adjacent lists separate.

Related tools