tool
Markdown Formatter
Normalise headings, lists, emphasis and tables so every README and doc follows one consistent style.
paste your code and choose format
Give your Markdown one consistent style
README files, documentation sites, changelogs and blog posts written in Markdown pick up a mix of styles over time: *, + and - bullets, two ways of writing bold and italic text, ragged tables and missing or doubled blank lines. Paste your Markdown and this formatter rewrites it in one consistent style using Prettier, the same formatter many open-source projects run on their docs. The rendered result looks the same; only the source becomes cleaner. It runs in your browser, so drafts stay private.
What can you do?
- 1. Tidy headings and spacing
Extra spaces after # are removed and every heading, list, table and code block gets exactly one blank line around it. Underlined (setext) headings are kept as you wrote them. - 2. Uniform lists and emphasis
Bullets use -, italic text uses _underscores_ and bold uses **double asterisks**, with list indentation normalised. - 3. Aligned tables
Table columns are padded so pipes line up, making GitHub-flavoured Markdown tables readable in the raw file too. - 4. Code blocks left alone
Fenced and indented code blocks are copied exactly as written, so your examples are never altered. - 5. Word, heading and line counts
Keep an eye on the length and structure of a README or article as you edit.
Why format Markdown?
Markdown is forgiving, which is exactly why files drift. Several people edit the same README, one uses asterisks and another hyphens, someone pastes a table from a spreadsheet, and the raw file becomes hard to read and produces noisy diffs.
A formatter settles every style question once. That keeps pull requests focused on content changes and makes the source as readable as the rendered page, which matters for files people often read on the command line or in an editor.
How to format Markdown online
- 1. Paste your Markdown
A README, a docs page, a changelog or a blog post draft. - 2. Click format
Markdown has no syntax errors as such (any text is valid Markdown), so the tool formats straight away. - 3. Review the changes
Check anything that looks different from what you expected; the notes below explain the most common surprises. - 4. Copy the result
Paste the formatted Markdown back into your repository or CMS.
Example: tidying a README
What the formatter changes
| Element | Before | After |
|---|---|---|
| Heading | # Title | # Title |
| Bullet list | * item | - item |
| Italic | *text* | _text_ |
| Bold | __text__ | **text** |
| Table | |a|b| | | a | b | |
| Long paragraphs | One line per paragraph | Unchanged (lines aren't re-wrapped) |
Markdown surprises the formatter reveals
The formatter follows CommonMark, the standard behind GitHub, GitLab and most static site generators. Sometimes that exposes Markdown that never rendered the way you thought:
- Mixed bullet characters start a new list
Switching from*to+or-in the middle of a list creates two separate lists. Use the same character for every item. - Tables need a blank line before them
A table written directly under a list item or paragraph becomes part of that block. Leave an empty line above every table. - Two spaces at the end of a line are a line break
Trailing double spaces create a hard line break. If that's intentional, consider a backslash at the end of the line, which is easier to see.
Frequently asked questions
Will formatting change how my Markdown renders?
No. The changes are stylistic and produce the same HTML when rendered, so headings, links, emphasis and tables look the same on GitHub or your site.
Does it format code inside fenced code blocks?
No. Code blocks are copied exactly as written. To tidy the code itself, run it through the matching formatter, such as the JavaScript, TypeScript or JSON formatter, and paste it back.
Does it wrap long lines?
No. Paragraphs keep their original line breaks, so one-sentence-per-line and one-paragraph-per-line styles both stay as they are.
Can I use it for MDX or front matter?
YAML front matter between --- lines at the top of the file is kept. MDX-specific syntax such as imports and JSX components isn't supported here.
Is there a Markdown validator or minifier?
Markdown has no invalid syntax: anything you type renders as something, so there's nothing to validate. Minifying isn't useful either, since Markdown is converted to HTML before it's served.
Related tools
Writing docs for an API or config? Format your examples with the JSON formatter or the YAML formatter before pasting them in.
- YAML Formatter & Validator – Fix YAML indentation and find syntax errors in config files.
- JSON Formatter & Validator – Pretty-print, validate and minify JSON.
- HTML Formatter, Validator & Minifier – Indent markup, catch structural errors and compact HTML.
- Diff Checker – Compare two versions of text or code line by line.