Markdown Formatter
Paste Markdown or open a local file, choose formatting preferences, then review the diff before copying or downloading. Protected content and parsed-structure checks keep an unsuitable transformation from replacing the 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.
- Can I format an existing Markdown table?
- Paste the complete pipe table, including its header and separator row, and format it with the rest of the document. The Markdown formatter aligns its syntax, then checks the parsed structure before accepting the output. A long table can exceed the line-width target. This formats Markdown already written; it does not import a spreadsheet or install an editor extension.
Formatting preserves intended syntax; unsupported extensions are identified and original text retained.