Markdown Formatter
Paste a Markdown document and the formatter rewrites it to a consistent style: fixes heading level jumps (no H2 after H4), pads table columns to align in the source, enforces a single blank line between blocks, normalises list markers to -, collapses runs of blank lines, and sorts reference-style link definitions at the bottom. The rendered HTML doesn’t change, only the source file gets tidier, so diffs become readable.
How the formatter rewrites Markdown
-
1
Paste Markdown
Drop the raw document: README, docs page, meeting notes.
-
2
Pick style options
List marker (`-`/`*`), heading style (ATX/Setext), table alignment, wrap column.
-
3
Format
The tool parses the document into an AST and re-serializes it with the chosen style.
-
4
Diff the output
A side-by-side view shows what changed before you paste it back.
What the formatter fixes
- List markers.
*,-,+all get normalised to one consistent character (default-). - Heading hierarchy. Warns (or promotes) when H2 is followed by H4 with no H3 in between.
- Blank lines. Exactly one blank line between blocks; no runs of three or more.
- Tables. Pads each column so the pipes align in the source, even though Markdown renderers don’t care.
- Trailing whitespace. Strips trailing spaces on every line except the intentional two-space line-break marker.
- Reference links. Collects
[label]: urldefinitions at the end of the document, sorted alphabetically. - Code fences. Language tag is normalised to lowercase; indent-based code blocks become fenced blocks.
Style options you can set
| Option | Default | Alternatives |
|---|---|---|
| List marker | - |
*, + |
| Heading style | ATX | Setext for H1/H2 |
| Emphasis delimiter | * |
_ |
| Bold delimiter | ** |
__ |
| Wrap column | 0 (off) | 80, 100, 120 |
| Sort reference links | on | off |
Why consistent Markdown matters
In a team repo, inconsistent Markdown produces noisy diffs: every time someone saves a file with a different editor, list markers swap and tables reflow. A formatter enforces one style so pull request reviewers see only content changes. Think of it as prettier for prose.
When not to format
- Fenced code blocks stay byte-for-byte intact, the formatter will never touch the contents of a code block. If formatting changes code, it’s a bug.
- Intentional hard wraps at narrow widths (readme.md on a terminal project) get re-wrapped if you enable the wrap column. Disable wrap if you keep hand-tuned line breaks.
- Embedded HTML blocks pass through unchanged.
Drop-in replacements
If you prefer a local CLI, the formatter uses the same AST rules as remark-stringify with the remark-gfm plugin. prettier --parser markdown produces a similar result.
Frequently Asked Questions
No. The formatter rewrites the source only, rendered HTML output for both the before and after should be equivalent. If you see a rendering change, report it as a bug.
No. YAML or TOML front-matter at the top of the file is detected and passed through untouched.
Yes, set the wrap column to 80, 100 or 120 and paragraphs will be rewrapped. Lines inside code fences are never touched.
No. The formatter assumes your links work; it only reorganizes reference-link definitions. Use a link checker tool separately.
No. Parsing and formatting run in your browser; the content never leaves your device.
Related Tools
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
HTML Character Reference
Searchable list of HTML entities, their named and numeric codes, and a one-click copy for special characters and symbols.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
Tool available in other languages
- مُنسِّق ماركداون [AR]
- ตัวจัดรูปแบบ Markdown [TH]
- Formateador de Markdown [ES]
- Formateur Markdown [FR]
- Markdown フォーマッター [JA]
- Markdown 포맷터 [KO]
- Formater Markdown [PL]
- Formatador de Markdown [PT]
- Markdown-formaterare [SV]
- Trình định dạng Markdown [VI]
- Markdown-Formatter [DE]
- Pemformat Markdown [ID]
- Markdown-formatter [NL]
- Markdown Biçimlendirici [TR]
- Markdown 格式化工具 [ZH]
- Formatter Markdown [IT]
- Форматтер Markdown [RU]