Paste a README or any Markdown file and get it back in one consistent style, close to what Prettier produces. Setext headings (Title underlined with ===) become ATX headings (# Title), closing #s are dropped, bullets use one marker, ordered lists are renumbered, *italic*/__bold__ are normalized to the style you pick, thematic breaks become ---, and every block gets exactly one blank line around it. Trailing whitespace goes, runs of blank lines collapse to one, and the file ends with a single newline.
GFM tables are re-padded so the pipes line up, with the delimiter row matching each column’s alignment (:--, :-:, --:). Wide characters such as CJK and emoji count as two columns. Turn off Pad table columns if you prefer compact | a | b | rows that produce smaller diffs.
Code is never touched. Fenced blocks keep their content byte for byte, including trailing spaces; only the fence itself is normalized to backticks (made longer when the code contains its own fence). Inline code spans, URLs, autolinks and inline HTML are left exactly as they are, so snake_case names and * inside code stay put. Emphasis is only rewritten when both markers sit on word boundaries, so 2*3*4 and file_name_here are left alone.
A few things to know:
- Wrap prose at reflows paragraphs to the given width (0 keeps your line breaks). It never breaks inside a code span and never starts a line with something that would turn into a list, heading or quote.
- Hard line breaks are kept: two trailing spaces stay as exactly two spaces, and a trailing backslash stays.
- Two different lists that sit next to each other (for example a
*list followed by a+list) keep different markers, because using the same one would merge them into a single list. - YAML or TOML front matter at the top is passed through unchanged.
Everything runs locally in your browser. Run the formatter on its own output and nothing changes.