Part of Code & data tools
Markdown formatter: tidy docs and preview HTML
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
- Paste Markdown from a README, doc, or chat export.
- Review the HTML preview as you edit.
- Click Format to normalize blank lines and list markers, or Tidy to strip comments and trailing spaces.
- Copy the cleaned Markdown back into your repo or CMS.
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.
Before and after examples
| Original | Converted | Notes |
|---|---|---|
| #Title\n-item\n-item2 | Spaced heading + list | Messy paste |
| Para.\n\n\n\nNext. | Single blank line | Excess spacing |