Markdown Formatter

Runs 100% in your browser

Format Markdown locally with consistent headings, lists, blank lines, blockquotes, tables, code fences, GFM task lists, strikethrough, diagnostics, history, preview, copy, and download.


MARKDOWN INPUT

Source document

0 bytes
0 lines0 words
FORMATTED MARKDOWN

Normalized output

Waiting
0 bytes0 lines
SANITIZED PREVIEW

Rendered output

Local preview — no external requests

Load or paste Markdown to see a safe local preview.

FORMAT REVIEW

Diagnostics & stats

0 warnings
Formatting stays in browser memory. Fenced code and inline code are protected from prose normalization.
Input bytes0
Output bytes0
Saved bytes0
Reduction0%
Headings0
Lists0
Tables0
Code blocks0
Links0
Words0
SESSION HISTORY

Recent documents

Up to 8 entries · not stored
  • No history yet.
Formatting, not conversion This tool normalizes Markdown source and renders a local preview. It does not execute HTML, fetch remote URLs, or claim to replace a full CommonMark/GFM parser, markdownlint, or a project build pipeline such as Prettier.
Your Markdown never leaves your browser. No upload, no server, no account required.

Frequently asked questions

A Markdown Formatter normalizes Markdown source so headings, lists, blank lines, blockquotes, tables, code fences, and common spacing follow a consistent style. It improves readability and diff reviews without converting the document to HTML.

Paste Markdown into the source panel or open a local .md file. Choose heading style, bullet marker, ordered-list numbering, code-fence style, table alignment, and trailing-space options, then click Format Markdown or enable Live mode. Review the formatted output and sanitized preview before copying or downloading.

Yes. The formatter normalizes README headings, lists, tables, code fences, blockquotes, and blank lines before you commit. Review GitHub-specific extensions such as task lists, alerts, mermaid diagrams, and HTML blocks after formatting because dialect support varies across renderers.

Yes. Fenced code content is never touched by prose whitespace normalization. The opening fence marker and optional language label are normalized to your selected fence style (backticks or tildes), but every line inside the fence remains exactly as you wrote it.

Yes. ATX headings use hash prefixes such as # Heading. Setext formatting uses underline characters for H1 (=) and H2 (-). Other heading levels always use ATX because Setext only supports two levels.

Yes. Unordered list markers can be normalized to hyphens, asterisks, or plus signs across the entire document. Nested list indentation is preserved. Review mixed-list structures in the preview before copying.

The formatter can emit sequential numbers (1. 2. 3.) or use repeated 1. lazy markers. Repeated 1. markers are valid in CommonMark and GitHub Flavored Markdown and let the renderer control numbering display.

Yes. Pipe tables with a separator row are aligned by column width or compacted to minimal spacing. The formatter reports table count and warns when a data row has a different cell count from the header row.

Yes. The preview renderer renders GFM task list items — - [ ] and - [x] — as disabled checkboxes so you can visually inspect the checklist structure. The formatter preserves task list source as-is and does not rewrite checkbox syntax.

Yes. The preview renderer converts ~~strikethrough~~ to a del element with a line-through style. The source Markdown is preserved unchanged because strikethrough is a GFM extension rather than a formatting normalization target.

Yes. The default option removes trailing spaces from line ends throughout the document. If your Markdown uses two trailing spaces for a hard line break, disable the trailing-space option or review those lines before formatting.

Yes. Consecutive blockquote lines are normalized to a consistent > prefix. Common thematic-break variants (---, ***, ___) are normalized to --- outside protected code fences and inline-code spans.

No. The preview is rendered locally from a limited Markdown renderer that escapes source text before building HTML. It does not execute scripts, inject arbitrary HTML from the document, or make any network requests.

No. It provides focused diagnostics such as unclosed fenced code blocks and uneven table row cell counts, but it is not a complete markdownlint engine and should not be described as comprehensive standards validation.

No. Its primary output is normalized Markdown source. The formatted output is still Markdown, not HTML. Use the Markdown to HTML tool when you need generated HTML, and use Markdown Preview when you primarily want rendered visual inspection.

Yes. Paste text or open a local .md, .markdown, .mdown, or .mkdn file and process it entirely in the browser. The dedicated client does not use fetch, XMLHttpRequest, beacons, localStorage, or sessionStorage for the conversion workflow.

Session history stores the last 8 formatted documents in browser memory for the current page session. You can click any history entry to reload that source into the input panel. No history is written to localStorage or any persistent storage.

Live mode applies formatting automatically 280 ms after you stop typing. It is useful for continuous editing. Disable Live mode when working with large documents to avoid reprocessing on every keystroke.

Yes. Copy Markdown sends the formatted source to the clipboard using the browser Clipboard API. Download .md saves a local formatted.md file using a Blob URL without any server upload.

It supports many common Markdown structures including ATX and Setext headings, unordered and ordered lists, blockquotes, pipe tables, links, images, fenced code, task lists, and strikethrough. It does not claim complete CommonMark or GFM conformance, so test extensions such as footnotes, alerts, math blocks, and embedded HTML in your target renderer.

Formatting aims to preserve meaning while normalizing style. Dialect-specific syntax, hard breaks, nested lists, tables with complex inline content, raw HTML, and unusual escape sequences can be sensitive to normalization. Compare source and preview, keep the original file, and run your project Markdown checks before publishing.

The stats panel shows input bytes, output bytes, saved bytes, reduction percentage, heading count, list-item count, table count, code-block count, link count, and word count. These help you understand the document structure and verify that normalization behaved as expected.

The page is a free browser utility with no account required. It provides local Markdown processing, configurable formatting controls, GFM task list and strikethrough preview, diagnostics, session history, 10-stat panel, copy, and download without sending source to a remote conversion service.

What is Markdown Formatter?

A Markdown Formatter normalizes Markdown source so headings, lists, blank lines, blockquotes, tables, code fences, and common spacing follow a consistent readable style while protected code content stays completely unchanged.

Unlike a Markdown-to-HTML converter, a Markdown Formatter outputs formatted Markdown — the same dialect you started with, cleaned up. It is useful before you commit a README, publish documentation, share a wiki page, or run a diff review on a pull request, because consistent formatting removes irrelevant whitespace noise from diffs.

What Gets Normalized

ToolsSonic's Markdown Formatter applies heading spacing (blank line before and after every heading), bullet-marker normalization (hyphen, asterisk, or plus throughout), ordered-list renumbering (sequential or lazy 1. style), fenced-code-block marker normalization (backticks or tildes), pipe-table alignment or compaction, blockquote prefix normalization (> ), thematic-break normalization (---), trailing-whitespace removal, and zero-width character stripping. All transformations are transparent: fenced code block content and inline code spans are never touched.

GFM Task Lists and Strikethrough in Preview

The sanitized local preview renders GFM task list items (- [ ] and - [x]) as disabled checkboxes so you can visually inspect checklist structure. It renders ~~strikethrough~~ as struck-through text. Both features are previewed but the source Markdown is preserved unchanged because task list and strikethrough syntax is already valid GFM and does not require reformatting.

Diagnostics and Statistics

The Format Review panel reports every normalization applied and any warnings — unclosed fenced code blocks and uneven table row cell counts. The stats panel reports 10 metrics: input bytes, output bytes, saved bytes, reduction percentage, heading count, list-item count, table count, code-block count, link count, and word count. These help you verify that normalization behaved as expected before copying or downloading.

Common use cases

  • Formatting a GitHub README before committing
  • Cleaning Markdown documentation and wiki pages for consistent style
  • Normalizing headings, bullets, and ordered lists across a document
  • Aligning pipe tables for easier source review and diffs
  • Preserving fenced code while removing prose whitespace noise
  • Checking unclosed code fences and uneven table rows
  • Formatting a local .md file without uploading it
  • Previewing normalized GFM task lists and strikethrough before publishing

Why use ToolsSonic's Markdown Formatter?

The dedicated browser-only Markdown Formatter combines source and formatted panes with a sanitized local preview that renders GFM task lists and strikethrough, configurable ATX or Setext headings, bullet markers, ordered-list numbering, code-fence style, table alignment, trailing-space policy, live mode with 280ms debounce, 8-entry session history, 10-stat panel, diagnostics, local .md file input, copy, download, and explicit boundaries around CommonMark, GFM, linting, conversion, and editing. It is designed as a focused formatter rather than a cloud editor or a remote URL loader.

Markdown Formatting Policy Reference

ElementNormalized toProtected?
ATX headings # H1Blank line before + after; trailing # strippedContent preserved
Setext headingsConverted to ATX (or kept as Setext if selected)Content preserved
Unordered list markersYour choice: - * +Nested indent preserved
Ordered list numbersSequential (1. 2. 3.) or lazy (1. 1. 1.)Content preserved
Fenced code blocksFence char normalized (``` or ~~~); lang label kept✅ Content never touched
Inline code ``Preserved as-is✅ Always preserved
Pipe tablesColumn-aligned or compact; alignment markers keptCell content preserved
BlockquotesNormalized to single > prefixContent preserved
Thematic breaksNormalized to ---N/A
Trailing whitespaceRemoved (toggle off for hard-break lines)Configurable
Zero-width charsStripped (U+200B, U+200C, U+200D, BOM)N/A
GFM task listsSource preserved; rendered as checkboxes in preview✅ Preserved
Strikethrough ~~text~~Source preserved; rendered as del in preview✅ Preserved

Markdown Formatter vs Converter vs Linter vs Editor vs Preview

ToolInputOutputUse when
Markdown FormatterMarkdownNormalized MarkdownYou need consistent style before committing or publishing
Markdown to HTMLMarkdownHTMLYou need rendered HTML for a web page or CMS
HTML to MarkdownHTMLMarkdownYou are migrating HTML content to a Markdown-based system
Markdown PreviewMarkdownVisual renderYou need to see how the document renders without exporting
markdownlint / PrettierMarkdownLinted / formattedYou need rules enforcement and source maps in a CI pipeline
Dillinger / StackEditMarkdownMarkdown + live previewYou need a full cloud editor with sync and export
100% private — runs in your browser Instant — no server round-trip Free forever — no account needed

Markdown Preview

Editor's choice

Render Markdown as HTML and preview it live — sanitized, script-free, with a clear source/preview split.

Markdown to HTML

Editor's choice

Convert Markdown to clean, structured HTML locally — headings, paragraphs, links, images, lists, tables with column alignment, nested lists, task lists, blockquotes, setext headings, and fenced code with a sanitized preview.

HTML to Markdown

Editor's choice

Convert clean HTML back to Markdown — headings, bold, italic, code, tables, lists, links, images, and blockquotes with full GFM support.

Markdown Table Generator

Editor's choice

Create aligned GitHub Flavored Markdown pipe-table syntax visually — edit rows and columns, paste from Excel, Google Sheets, CSV, or an existing Markdown table, set per-column alignment, escape pipes, preview the rendered result, and download .md, .html, or .csv. Free, no upload.

Markdown Checklist Generator

Editor's choice

Build GitHub-compatible Markdown checklists visually — add tasks, indent subtasks, group under headings, import plain text or existing GFM, mark progress, preview, and download .md or .html. Free, 100% browser-local, no upload.

Markdown TOC Generator

Editor's choice

Generate a linked table of contents from any Markdown document — ATX and Setext headings, anchor-safe GitHub slugs, duplicate disambiguation, hierarchical numbering.