Markdown Formatter

0 words0 characters1 lines
Markdown

What Is a Markdown Formatter?

A markdown formatter is a tool that automatically cleans up and standardizes your markdown files. It fixes the spacing around headings, makes list markers consistent, collapses extra blank lines, and removes trailing whitespace. The result is cleaner, more readable markdown that follows consistent style conventions.

How to Format Markdown Online

  1. Paste your markdown content into the editor on the left.
  2. Click the Format button.
  3. The cleaned-up markdown replaces the input. Copy or download the result.

What Gets Formatted?

  • Headings get one space after the # and a blank line before them
  • Bullet markers (*, +, -) all become -
  • Ordered list items are renumbered to 1.
  • Repeated blank lines collapse into one
  • Trailing whitespace is removed, including the two spaces of a hard line break
  • Fenced code blocks, tables, and horizontal rules keep their content

Formatting Rules Applied

The formatter applies a small, fixed set of rules. Headings get a blank line before them and a single space after the # characters. Lists use consistent markers (- for unordered, 1. for ordered), and nested items keep their indentation. Fenced code blocks are copied through as written, as long as the fence is indented fewer than four spaces. A fence nested deeper, and list markers inside blockquotes, are not recognized.

Tables, emphasis markers, and heading levels are not changed. To align table columns, use the Markdown Table Formatter.

Frequently Asked Questions

What formatting rules does this tool apply?

The formatter puts one space after the # in headings and a blank line before each heading, changes * and + bullet markers to hyphens, renumbers ordered list items to 1., collapses repeated blank lines into one, and removes trailing whitespace. Heading levels, emphasis markers, and tables are left as you wrote them.

Does it change my content?

It leaves your words, links, and images alone and changes only whitespace, list markers, and list numbers. Check the result in four cases. A line that starts with # and no space, such as #hashtag, becomes the heading # hashtag. A line of text that starts with a number and a period, such as 1999. That was the year, is treated as a list item and renumbered. A list that starts at a number other than 1 will start at 1 afterwards. Two trailing spaces used as a line break are removed.

Does it support CommonMark and GFM?

Yes. It works on CommonMark and GitHub Flavored Markdown documents. Fenced code blocks are copied through as written unless the fence is indented four or more spaces, task lists keep their checkboxes, and tables are left as written.

Does it format markdown tables?

No. The formatter leaves tables as written: it does not align columns or pad cells. To align and tidy a table, use the Markdown Table Formatter.

Related Tools