Markdown Formatter & Previewer

Character Count: 0 | Word Count: 0 | Sentence Count: 0 | Line Count: 0

Markdown formatter: tidy docs and preview HTML

A Markdown formatter cleans spacing around headings, lists, and paragraphs so README files, Notion exports, and CMS drafts stay consistent. The live preview shows how CommonMark/GFM renders as HTML before you publish.

Use it to normalize messy paste jobs—not as a full static-site generator or lint suite like markdownlint in CI.

How to use this converter

  1. Paste Markdown from a README, doc, or chat export.
  2. Review the HTML preview as you edit.
  3. Click Format to normalize blank lines and list markers, or Tidy to strip comments and trailing spaces.
  4. Copy the cleaned Markdown back into your repo or CMS.

Before and after examples

OriginalConvertedNotes
#Title\n-item\n-item2Spaced heading + listMessy paste
Para.\n\n\n\nNext.Single blank lineExcess spacing

Headings, lists, and blank lines

Readable Markdown usually keeps a blank line before ATX headings (`#`) and consistent list markers (`-` or `*`). Formatting collapses runs of empty lines so diffs stay reviewable. Numbered lists keep their indices; reorder manually if you renumber sections.

Fenced code blocks and indented code are left intact so you do not accidentally unwrap examples. Tables in GitHub Flavored Markdown still need aligned pipes—fix whitespace around rows, then fix column alignment if a renderer is picky.

Preview vs source of truth

The HTML preview helps catch broken links text and heading hierarchy before merge. Different hosts (GitHub, GitLab, Confluence) parse edge cases differently—treat the preview as guidance, then verify on the platform that publishes the doc.

Docs, HTML, and YAML front matter

For static sites, tidy Markdown here, then keep YAML front matter valid with the YAML formatter if needed. When you convert docs to HTML for email or a CMS that only accepts rich text, pair this tool with the HTML formatter after export.

Frequently asked questions

Does formatting change my link URLs?

No. Link destinations and image paths stay as written; only surrounding whitespace and list markers are normalized.

Is the preview sanitised?

Treat untrusted Markdown carefully. Preview is for your own drafts—do not paste secrets or untrusted HTML-heavy content.

Can it convert Markdown to HTML for download?

Use the on-page preview to inspect HTML. For production conversion, prefer your static-site or CMS pipeline.

Guides and deeper reading