Output appears here.
The Markdown Formatter normalizes headings, lists, emphasis and spacing in Markdown with Prettier, and aligns table columns so pipe tables read cleanly as plain text. It suits READMEs, docs, changelogs and pull request descriptions before you commit or paste them. Code blocks in known languages are formatted too. Everything runs in your browser — nothing is uploaded.
How to format Markdown
- Paste Markdown, drop a
.md,.markdownor.mdxfile, or choose Load example. - Choose Prose wrap: keep your line breaks, wrap paragraphs at the print width, or join each paragraph onto one line.
- Copy with ⌥/Alt C or download with ⌘/Ctrl S. Use Convert to plain text to strip the syntax, or Switch to HTML for rendered markup.
Examples
README with a table
A hastily written README: missing blank lines, * bullets, extra spaces and an unaligned table.
# Project title
A short description.
* install deps
* run `pnpm dev`
|Name|Type|Default|
|-|-|-|
|indent|number|2|
|sortKeys|boolean|false|
See [docs](https://example.com)for more.Result:
# Project title
A short description.
- install deps
- run `pnpm dev`
| Name | Type | Default |
| -------- | ------- | ------- |
| indent | number | 2 |
| sortKeys | boolean | false |
See [docs](https://example.com)for more.The missing space before "for" is left alone: the formatter changes Markdown syntax, not your prose.
Messy lists and headings
Parenthesis-style numbering, + bullets and a heading squeezed against its paragraph.
1) First
2) Second
+ nested
+ items
## Heading
textResult:
1. First
2. Second
- nested
- items
## Heading
textEmphasis markers and fenced code
Underscore bold becomes **, asterisk italics become _, and the JavaScript block is formatted by the JavaScript printer.
Setext heading
==============
__Bold__ and *italic* text.
```js
const a={b:1}
```Result:
Setext heading
==============
**Bold** and _italic_ text.
```js
const a = { b: 1 };
```Prose wrap set to Always wrap
A long paragraph is wrapped at the 80-character print width.
Formattr formats JSON, SQL, YAML and more in the browser. Nothing you paste is uploaded, and settings are remembered on this device only.Result:
Formattr formats JSON, SQL, YAML and more in the browser. Nothing you paste is
uploaded, and settings are remembered on this device only.Options explained
- Print width — the line length (80, 100 or 120) that paragraphs are reflowed to when Prose wrap is set to Always wrap; with the other Prose wrap choices it has no effect.
- Tab width — the indentation unit, 2 or 4 spaces; nested list content is always aligned under its marker, so in most documents this produces no visible change.
- Prose wrap — Preserve keeps your line breaks inside paragraphs, Always wrap reflows paragraphs to the print width, and Never wrap joins each paragraph onto a single line.
Troubleshooting Markdown formatting
My line breaks inside a paragraph disappeared
Prose wrap is set to Never wrap, which joins the lines of each paragraph. Set it to Preserve to keep them. If a line break must render as a break, end the line with two spaces or a backslash.
A code block was reformatted when it should not be
Fenced blocks labelled with a language Prettier supports are formatted with that language's printer. If a snippet is intentionally unformatted, such as a before-and-after example, remove the language label or use text.
A table did not align
The table needs a delimiter row (|-|-|) directly under the header, and each row needs the same number of cells. Without that row, the lines are ordinary paragraphs that contain pipes.
MDX components were not changed
.mdx files are read as Markdown: import lines and JSX components such as <Chart /> are kept as written, while the Markdown around them is formatted.
Wide tables break the print width
Tables are never wrapped, because a table row must stay on one line. Very wide tables stay wide; that is expected.
FAQ
How do I align a Markdown table?
Paste the table and the formatter pads every cell so the pipes line up, with a matching delimiter row under the header. Column alignment markers such as :-- and --: are kept and reflected in the padding. The table renders exactly as before; only the plain-text view becomes readable, which matters in code review and in terminals.
Will formatting change how my Markdown renders?
No. The formatter only switches between equivalent syntaxes — * and - bullets, __ and ** bold — and adds blank lines that renderers treat the same way. With Prose wrap on Preserve, paragraph line breaks stay exactly where they were. The one visible difference comes from Never wrap, which can remove line breaks your renderer displayed.
Does it work for GitHub READMEs?
Yes. GitHub-flavored syntax, including tables, task lists (- [ ]), strikethrough and fenced code blocks, is understood and kept. Many repositories run Prettier on Markdown in CI, so formatting here with the same print width and prose wrap setting usually produces a file those checks accept.
Which Prose wrap setting should I use?
Preserve is the safest for existing files, since it avoids rewrapping every paragraph. Always wrap suits documentation reviewed as diffs, since short lines give smaller diffs. Never wrap, one line per paragraph, suits content pasted into CMSs, issue trackers or chat tools that treat newlines as breaks.
Is my document uploaded?
No. The formatter runs in your browser, in an isolated editor frame that blocks network requests, so drafts and internal documentation are not uploaded or stored on a server. Images and links in the document are not fetched. Settings are remembered on this device; input is stored only if you turn on "Remember my last input".
What changes and what stays
The formatter rewrites Markdown syntax into one consistent style and leaves your words alone.
| Changes | Stays as written |
|---|---|
* and + bullets become - |
Paragraph text, spelling and spacing inside sentences |
1) numbering becomes 1. |
Whether a list counts up (1. 2. 3.) or repeats 1. |
__bold__ becomes **bold**, *italic* becomes _italic_ |
Link URLs, image paths and reference definitions |
| Blank lines added around headings, lists and code blocks | Contents of unlabelled code blocks and indented code |
| Tables padded so columns align | Inline HTML and setext (underlined) headings |
Code blocks labelled js, css, json and similar are formatted |
Two trailing spaces used as a hard line break |
Related tools
Strip the syntax with Markdown to Text, clean pasted content with the Text Cleaner, format generated markup in the HTML Formatter, or browse all code tools.