All free tools

Markdown Formatter, Preview and Download

Format messy Markdown, preview how it will render, then copy it or download the .md file. Nothing leaves your browser.

What to tidy

Paste or type below. Nothing is uploaded.

Preview and formatted Markdown appear here

Paste something on the left, or try the example. Then copy the result or download the .md file.

Your Markdown is formatted in your browser. Nothing is uploaded, stored or logged.

Why Markdown gets messy

Markdown is forgiving, which is its best feature and the reason files drift. Three different characters make a bullet. A list numbered 1. 1. 1. renders correctly, so nobody notices it is wrong in the source. Headings can be written two completely different ways. Paste from a few places over a few months and a file ends up using all of them.

None of that is visible in the rendered output, which is exactly why it accumulates. It shows up later, when someone opens the raw file, runs it through a linter, or diffs two versions and gets a wall of whitespace changes burying the one line that actually changed.

What this tool changes

Five things, each of which you can turn off:

  • Underlined headings become # headings. A title underlined with === and one written # produce identical output, but only one of them survives being moved, indented or quoted.
  • Every bullet becomes -. Markdown accepts *, + and -. Picking one makes a diff readable.
  • Ordered lists are renumbered. 1. 1. 1. and 3. 7. 2. both render as 1, 2, 3, so the source can be wrong indefinitely without anyone seeing it. Nested lists are numbered per level.
  • Runs of blank lines collapse to one. Two blank lines and five blank lines mean the same thing to Markdown.
  • Trailing spaces are removed, except the deliberate two that make a hard line break.

What it will not touch

Code blocks. Everything between fences is set aside before formatting starts and put back exactly as it was. Indentation is meaningful in most languages, a leading dash is meaningful in a diff, and blank lines are meaningful in plenty of output. A formatter that tidies inside a code block has broken the document.

Heading levels. If you jump from # to ###, that is left alone. It might be an accident, but it might be deliberate, and the difference is not something a formatter can know. Changing it would rewrite the structure of your document rather than its formatting.

Your words. Nothing is reworded, reordered or deleted. The only things removed are blank space and the difference between two ways of writing the same construct.

Checking it did no harm

The output panel switches between the formatted Markdown and a rendered preview of that same text. That is the point of the preview: it is not showing you the original, it is showing you the result, so you can confirm that tidying the source left the meaning untouched.

Copy the result, or download it as a .md file. Both act on exactly what you see.

Getting Markdown into WordPress

Formatting a file is often the step before publishing it. If that is where this is heading, the free DocxToPost plugin on WordPress.org imports a .md file directly as a WordPress post, with headings, lists, tables, blockquotes and fenced code intact, and uploads any images alongside it.

That works for notes exported from Obsidian, Joplin or Notion, for a README, or for whatever an AI assistant handed you. For a whole folder at once, DocxToWP Pro adds bulk import and resolves the images each note references.

Formatted your Markdown?

Doing this often?

This tool handles one document and gives you markup to paste. The DocxToWP plugin skips the copy and paste. It uploads your images to the Media Library as real attachments, fills your Yoast or Rank Math fields, and imports a hundred documents in one run.

The free plugin has no upload cap. Pro is from $49/year and adds bulk import, scheduling and SEO fields.

Common questions

No. Every change is either whitespace or a choice between two spellings of the same thing, such as * or - for a bullet. Nothing is reworded, reordered or removed. That is the rule the tool is built around, and it is why the preview exists: you can switch between the Markdown and the rendered result to confirm the meaning is identical.

Nothing at all. Fenced blocks are set aside before any formatting runs and put back untouched, so indentation, blank lines and leading dashes inside them survive exactly as written. A line starting with a dash inside a diff block stays a diff, not a bullet. This is the most common way Markdown formatters quietly corrupt a document, so it is tested directly.

Because jumping from # to ### might be deliberate. Promoting it would rewrite the outline of your document on your behalf, which is a bigger change than tidying whitespace. The tool converts underlined headings to # style, since those are two spellings of the same heading, but it never changes a level.

Yes. Two spaces at the end of a line is a hard line break in Markdown, so those are preserved while other trailing whitespace is removed. If you meant the break, you keep it.

No. The formatting and the preview both run in your browser. Nothing is sent to a server, stored or logged, which matters because people paste drafts and unpublished client work into tools like this one.

Yes. Copy it to the clipboard, or download it as a .md file. If you want it in WordPress instead, the free DocxToPost plugin imports Markdown files directly as posts.

Related Articles

Pro from $49/year