Markdown Formatter
Paste Markdown or load a local file, choose formatting preferences, and review the changes before copying the result. Lists, headings and tables are formatted through a parser. Code-block and front-matter content stay protected, and a parsed-structure check prevents a changed document from silently replacing your original.
Formatting preferences and file input
Line width is a target; long URLs, tables and other syntax may exceed it. Embedded code and front-matter content are not reformatted.
Formatting preserves intended syntax; unsupported extensions are identified and original text retained. Processing stays in this browser. Inputs are not saved or rendered as executable HTML. Limit: 1 MiB.
Common questions
- Which formatter does this use?
- The tool uses the pinned Prettier 3.9.8 Markdown parser and formatter. Its licensed assets are served locally from this site and loaded only when you format. Formatting and diffing run in a cancellable browser worker.
- Will it reformat fenced code or front matter?
- Embedded-language formatting is disabled. Spaces inside code strings and front-matter values are protected. The tool parses the result again and compares its structure and protected values with the original; if they differ, it retains the complete original and explains why.
- What happens to unsupported Markdown extensions?
- Custom directives, template expressions, MDX expressions/imports, component-style HTML or JSX, and custom attribute lists are identified conservatively. The whole original document is retained rather than partly formatted. Extension-like text inside code blocks or inline code is left alone.
- How do line width and wrapping work?
- Choose a width from 20 to 200 columns. Preserve keeps existing prose wraps, Wrap to line width reflows paragraphs, and Unwrap paragraphs removes soft wraps. Width is a target, so syntax such as long URLs or tables can exceed it. Indentation and LF/CRLF line endings are separate preferences.
- What does the change preview show?
- The preview compares original and output lines. It normalizes line endings, marks additions and removals, and can include unchanged lines. It shows 100 rows per page and compares the first 20,000 lines on each side. Highly changed documents use a bounded alignment. Markdown copy/download always contain the full output; the downloadable change report follows the preview limit and is not an apply-ready patch.
- Is the Markdown rendered, uploaded or saved?
- No. Text is processed locally and displayed as text, so embedded HTML is not executed. Inputs are not saved. Files should be UTF-8 Markdown, with a 1 MiB input limit. Cancel or edit the source to stop a running worker; a 15-second timeout preserves the input if processing takes too long.
Formatting preserves intended syntax; unsupported extensions are identified and original text retained.