Markdown Preview
Runs 100% in your browserRender Markdown as HTML and preview it live — sanitized, script-free, with a clear source/preview split.
Load or paste Markdown to see a live preview.
- Paste Markdown to inspect rendering and diagnostics.
- No history yet.
Frequently asked questions
A Markdown Preview tool renders Markdown text as formatted HTML in real time so you can see exactly how headings, lists, tables, code blocks, links, images, and emphasis will appear when published — before committing to a file, a CMS, or a pull request.
Paste your Markdown into the source panel or open a .md file. The rendered preview updates as you type. No account, no install, and nothing is uploaded — rendering runs entirely in your browser.
Yes. The preview re-renders on every keystroke with a short debounce (≈200 ms) so you see the result in real time without lag, even for large documents.
Yes. Select "GitHub-style" in the Preview style dropdown to enable GFM extensions: pipe tables, fenced code blocks with language labels, task list checkboxes (- [ ] / - [x]), strikethrough (~~text~~), and autolinks.
No. All HTML output is sanitized before rendering. Script tags, event handlers, and dangerous attributes are stripped. Only a safe allow-list of block and inline elements is permitted in the output.
Yes. Open any .md, .markdown, .mdown, or .mkdn file using the "Open .md" button. The content loads into the source panel and the preview renders immediately.
Yes. Pipe tables with column alignment markers (| :--- | :---: | ---: |) are fully supported. Left, center, and right alignment are reflected in the rendered HTML table.
Yes. Fenced code blocks (``` or ~~~) are rendered in a monospace block. The language identifier is displayed as a label above the code for documentation clarity.
Yes. Lines beginning with "- [ ]" render as unchecked checkboxes and "- [x]" render as checked checkboxes in the preview, styled as a GFM task list.
Yes. Links are rendered as clickable anchors. Images are rendered only for safe URL schemes (http, https, data). JavaScript pseudo-URLs and other dangerous schemes are blocked.
Yes. Enable "Hard line breaks" in the options bar to treat every newline as a <br> element. Useful for poetry, lyrics, or any content where line breaks are meaningful.
Yes. Enable "Preserve safe HTML" to allow a curated allow-list of inline HTML elements — <details>, <summary>, <kbd>, <mark>, <sub>, <sup>, <br>, <hr> — to pass through the sanitizer.
The preview panel includes a diagnostics section that reports unclosed fences, suspicious syntax, and rendering warnings. It is not a strict linter but it flags the most common issues.
Yes. The Heading Navigation panel on the left of the bottom section builds a live clickable outline from all H1–H6 headings, with indentation reflecting the heading level. Click any heading to jump to it in the preview.
Yes. "Copy HTML" copies the sanitized HTML to your clipboard. "Download .html" saves a standalone HTML file with the rendered content and basic print-friendly styling.
Yes. The tool runs 100% in your browser. Your Markdown text is never sent to any server, stored in any database, or accessible to anyone other than you.
Yes. The page respects your OS colour scheme preference and includes a manual toggle. The source editor and preview panel both adapt to dark backgrounds with appropriate contrast.
Yes. The Markdown Preview tool is completely free with no usage limits, no sign-up required, and no ads in the tool itself. All rendering runs locally in your browser.
Preview renders pasted Markdown so you can check how it looks. The Editor is for writing — a workspace with live preview as you type. Markdown to HTML is for export — it gives you the HTML source to paste into a page or CMS. All three run locally in your browser.
What is Markdown Preview?
A Markdown Preview tool renders Markdown source text as formatted HTML in real time, letting you see exactly how your document will appear when published — before committing to a repository, posting to a CMS, or handing off to a designer. The split view keeps the raw source on the left and the rendered output on the right, updating on every keystroke.
What Markdown Preview Renders
The tool supports the full CommonMark block element set plus GitHub Flavored Markdown (GFM) extensions. Block elements rendered include ATX headings (# through ######) and Setext headings (underline with === or ---), unordered lists (-, *, +), ordered lists (1. and 1)), fenced code blocks (triple backtick or triple tilde with optional language label), indented code blocks, pipe tables with column alignment (:---, :---:, ---:), blockquotes (nested supported), horizontal rules (---, ***, ___), and paragraph breaks. Task lists render - [ ] as an unchecked checkbox and - [x] as a checked checkbox in a GFM-style list. Inline elements include bold (**text** or __text__), italic (*text* or _text_), bold-italic (***text***), strikethrough (~~text~~), inline code (`code`), links ([label](url)), images (), and autolinks (<https://...>). Hard line breaks can be enabled so that every newline becomes a <br> element. An optional safe-HTML mode allows a curated allow-list of inline HTML elements — <details>, <summary>, <kbd>, <mark>, <sub>, <sup>, <br>, <hr> — to pass through the sanitizer unchanged.
Security: Why Sanitization Matters
Raw HTML injected into innerHTML can execute scripts, load external resources, and exfiltrate data. Every Markdown preview tool that renders user input directly — without sanitization — is a potential XSS vector. ToolsSonic's Markdown Preview sanitizes all output before rendering: <script> tags are stripped, event handlers (onclick, onload, onerror, etc.) are removed, javascript: and data: URIs in href and src attributes are blocked, and only the safe allow-list of elements and attributes passes through. The rendered HTML is injected via textContent for the sanitizer pass and then assembled from safe primitives — not from raw innerHTML of untrusted input. This makes the tool safe for previewing documentation pulled from user inputs, external files, or untrusted sources.
Heading Navigation and Document Outline
For long Markdown documents — README files, API guides, knowledge-base articles, project wikis — navigating to a specific section is slow when scrolling through a long preview. The Heading Navigation panel builds a live clickable outline from all H1–H6 headings in the document, indented by level so the hierarchy is visible at a glance. Click any heading in the outline to scroll the preview to that section. The outline updates on every render, so new headings appear immediately as you write. Each heading receives a unique ID (with automatic slug de-duplication for repeated heading text), enabling anchor links in the downloaded HTML to work correctly.
The statistics panel tracks ten metrics in real time: source bytes, line count, word count, heading count, link count, image count, fenced code block count, table count, task item count, and warning count. The diagnostics review panel reports rendering issues such as unclosed fenced code blocks, invalid table syntax, and unusual escape sequences — helping you catch problems before publishing without switching to a separate linter tool.
Common use cases
- Previewing GitHub README files (.md) before pushing a commit, checking heading structure, table rendering, and badge image display
- Drafting and previewing technical documentation for developer portals, API references, and project wikis
- Writing and checking blog post content in Markdown before pasting into Ghost, WordPress, or Hashnode
- Verifying that pipe tables render with correct alignment before submitting to a Markdown-based CMS
- Previewing GFM task lists in project planning documents before sharing in GitHub issues or pull requests
- Checking fenced code block rendering for documentation tutorials before publishing to Read the Docs or GitHub Pages
- Downloading rendered HTML for embedding in email newsletters or static HTML pages without a Markdown runtime
Why use ToolsSonic's Markdown Preview?
ToolsSonic's Markdown Preview renders GitHub Flavored Markdown in your browser with no login, no cloud sync, and no upload. The tool renders on every keystroke with a debounced update so there is no lag even on large files.
vs. Dillinger (dillinger.io): Dillinger is a full Markdown editor with cloud sync to Dropbox, Google Drive, and GitHub. That makes it powerful but also account-dependent — you need to authorise cloud integrations before getting the features most developers actually need from a preview tool. ToolsSonic requires no account and has no sync overhead.
vs. StackEdit (stackedit.io): StackEdit is a feature-complete Markdown editor with offline PWA support and cloud storage. The preview is excellent but the tool is a full writing environment — complex to set up, requires a login for persistence, and heavyweight for a task as simple as "paste Markdown, see HTML". ToolsSonic opens instantly and requires nothing.
vs. Markdown Live Preview (markdownlivepreview.com): Clean and fast, but no heading navigation, no 10-stat panel, no copy-HTML button, no download, no session history, and no dark mode. ToolsSonic adds all of these while matching the speed.
Privacy guarantee: Open DevTools → Network tab. Paste a confidential README or internal documentation. Click anywhere. You will see zero outbound requests. Nothing is uploaded. The tool renders entirely in your browser using vanilla JavaScript with no external dependencies.
Markdown Element Rendering Reference
| Markdown Syntax | Rendered Element | Notes |
|---|---|---|
| # Heading 1 … ###### Heading 6 | <h1> … <h6> | ATX style; ID slug auto-generated for outline anchors |
| Title\n===== | <h1> | Setext style; === for H1, --- for H2 |
| **bold** / __bold__ | <strong> | Both delimiter styles supported |
| *italic* / _italic_ | <em> | Word-boundary aware to avoid false positives |
| ~~strikethrough~~ | <del> | GFM extension |
| `inline code` | <code> | HTML-escaped; no interpretation inside backticks |
| ```lang\ncode\n``` | <pre><code class="language-lang"> | Fenced block; language label displayed above |
| - [ ] task / - [x] done | <ul class="mp-tasklist"> with checkboxes | GFM task list; checkboxes are read-only in preview |
| | Col | Col |\n| --- | --- | | <table> | Pipe table; :--- left, :---: center, ---: right align |
| > blockquote | <blockquote> | Left-border styled; nested blockquotes supported |
| --- / *** / ___ | <hr> | Thematic break on its own line |
| [label](url) | <a href="url"> | Safe URL allow-list; javascript: blocked |
|  | <img alt="alt" src="url"> | Safe URL only; max-width:100% |
Markdown Preview vs. Full Markdown Editors
| Feature | ToolsSonic Preview | Dillinger | StackEdit | Markdown Live Preview |
|---|---|---|---|---|
| No login required | ✅ Always | ⚠️ For cloud features | ⚠️ For persistence | ✅ |
| Zero upload (privacy) | ✅ 100% local | ⚠️ Cloud sync option | ⚠️ Cloud sync | ✅ Local |
| Heading navigation outline | ✅ Live H1–H6 | ❌ | ✅ | ❌ |
| 10-stat analytics panel | ✅ | ❌ | ❌ | ❌ |
| Copy HTML output | ✅ | ✅ | ✅ | ❌ |
| Download standalone HTML | ✅ | ✅ (export) | ✅ (publish) | ❌ |
| Session history (8 entries) | ✅ | ❌ | ✅ (document list) | ❌ |
| Dark mode | ✅ | ✅ | ✅ | ❌ |
| Output sanitization (XSS safe) | ✅ Allow-list | ⚠️ Depends on config | ⚠️ Partial | ⚠️ Varies |
Related tools
Markdown to HTML
Editor's choiceConvert 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.
Markdown Formatter
Editor's choiceFormat Markdown locally with consistent headings, lists, blank lines, blockquotes, tables, code fences, GFM task lists, strikethrough, diagnostics, history, preview, copy, and download.
HTML to Markdown
Editor's choiceConvert clean HTML back to Markdown — headings, bold, italic, code, tables, lists, links, images, and blockquotes with full GFM support.
Markdown TOC Generator
Editor's choiceGenerate a linked table of contents from any Markdown document — ATX and Setext headings, anchor-safe GitHub slugs, duplicate disambiguation, hierarchical numbering.
Markdown Checklist Generator
Editor's choiceBuild 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 Table Generator
Editor's choiceCreate 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.