Markdown Preview

Text

Render Markdown to HTML in real time with markdown-it, GFM, code blocks and tables, a live writing companion for documentation, drafts and README files.

335 chars · 23 lines
Markdown
Preview

Hello Markdown

A bold and italic sample with a link.

Lists

  • item one
  • item two
  • item three

Code

const greet = (name) => `Hello, ${name}!`
console.log(greet('world'))

A blockquote with emphasis.

Header Value
Alpha 1
Beta 2

About Markdown Preview

The main uncertainty when writing Markdown is whether what you see in source matches what readers see rendered. A table missing one pipe collapses the whole block, an extra blank line before a list changes its nesting, and plain-text editors show none of it. A preview tool renders source into the final form immediately, exposing formatting problems the moment they are written. Markdown is plain-text markup plus rendering rules, and the same source can produce different HTML across implementations. Whether inline HTML is allowed, which extension covers tables and task lists, and whether a single newline is soft or hard all vary by default. So beyond checking the result, be aware that what you see here may not match the target platform exactly, especially since blogging platforms, code hosts and note apps each support a different extension set. Practical notes: Establish the target dialect first: if the document will be published somewhere, stick to the syntax subset that platform supports and avoid extensions only one implementation offers. Tables and code blocks break most often, so check that a table's column count matches its separator row and that code fences are paired. Align list indentation with the marker width, or content meant to nest is parsed as a code block, which is the classic "it looks aligned but renders wrong". Finally, do not skip heading levels, since they drive both table-of-contents generation and screen-reader navigation. Limits: One design goal of Markdown is readable plain text, so it cannot express elaborate layout; anything needing fine typography belongs in rich text or a dedicated markup language. There is also no single standard, with CommonMark only a consensus baseline, and extensions such as footnotes, definition lists and maths diverge further, so verify item by item before publishing across platforms. Rendered links and images also trigger external requests, so watch the Network panel when the document contains internal addresses or tracking parameters. One easily missed point: many platforms apply a sanitization pass after rendering with different tag allowlists, so embedded content that displays locally may be stripped there. Data and privacy: drafts usually contain unannounced notices, product documentation and internal links. This tool renders in the browser, uploads nothing, and shows the plain-text result even offline. For documents with internal links, preview with the Network panel visible or while disconnected. If the document ultimately feeds a documentation site generator, preview is only the first check and the real acceptance criterion is the generated page. Generators usually layer extra behaviour on top of Markdown, such as building a table of contents, turning headings into anchors and adding syntax highlighting to code blocks, all of which happen at generation time and are invisible in a plain preview. So before publishing, open the actual page in the target environment and verify heading depth, anchor navigation and highlighting, and confirm that external images and links resolve, which avoids the "fine locally, images broken in production" class of failure. Reviewing both the preview and the target environment before committing is the cheapest acceptance check available for documentation changes.

How It Works Internally

Preview turns plain text into a markup structure according to rendering rules. The same source can produce different results across implementations: whether inline markup is allowed, which extension covers tables and task lists, and whether a single newline is soft or hard all vary by default. Preview therefore confirms syntax only and does not replace testing on the target platform.

How extensions change the result
Input| a | b |\n| --- | --- |\n| 1 | 2 |
OutputWith table support it renders as a table; an implementation without it emits the pipe text literally

Measured on This Page

Fixed: straight quotes turned curlytypographer: true rewrote " into curly quotes, so <div class="raw"> previewed as class=“raw”; -- also became an en dash and ... an ellipsis, silently restyling code and config fragments. The option is now off and straight quotes survive
XSS safeWith html: false the img with onerror is emitted as &lt;img and never executes (window.__xss stayed unset)
Tables and headings# Title renders as <h1>, |a|b| becomes a <table> with thead/tbody, and inline code becomes <code>
Links[x](https://example.com) renders as <a href="https://example.com"> with no target=_blank or noopener added

Two of the defaults in a Markdown previewer look harmless and are not, and this page had one of each — 2 measurements, 2 fixes pending on the quote side. Typographic substitution turns straight quotes curly, -- into a dash and ... into an ellipsis: pleasing in prose, wrong in code — paste an HTML fragment to check an attribute and you read class=“raw”. Raw HTML is the other: it is disabled here (html: false), so script tags and onerror handlers show up as text, but switching it on demands an allow-list filter, or any pasted content runs. Links also open without noopener.

How this was measured: Five Markdown inputs (heading with inline code, table, an HTML fragment containing straight quotes, an img with an onerror handler, a link) were rendered one by one, reading back the innerHTML of .mp-preview to check output and whether any script fired. · Measured 2026-10-31

How to Use

  1. Open "Markdown Preview"
  2. Write or paste Markdown in the left pane
  3. The right pane renders it instantly
  4. Check tables, code blocks, and links
  5. Copy Markdown or HTML from the pane icons

Use Cases

  • README check — Confirm heading levels, badges, and code blocks render correctly before pushing.
  • Blog drafts — Preview article layout and verify images and links before publishing to a static site.
  • Learn syntax — Compare input and output live to master tables, task lists, and other Markdown.
  • Doc review — Screenshot the rendered output so non-technical colleagues can review content.
  • Code snippets — Verify fenced code blocks keep their language hint and indentation after rendering.
  • GitHub Gist authoring — Write and preview a Gist's README in split view before pasting the final markdown into the Gist editor.
  • API documentation — Compose doc comments with markdown syntax and verify the rendered output matches the expected formatting.

FAQ

Which Markdown flavor is supported?

Common CommonMark basics plus popular GFM extensions like tables, strikethrough, and task lists — enough for everyday writing.

Can it render raw HTML?

For safety, embedded script-style HTML is not executed, preventing malicious code from running during preview.

Are math formulas displayed?

This version focuses on text and code rendering; complex LaTeX may not be supported, so use a dedicated formula tool.

Can I export to HTML?

You can copy the rendered area directly or copy the Markdown source; for structured conversion, pair it with our other format tools.

Why does a pasted image link not show?

The preview loads images by URL; if an image requires login or has hotlink protection, the browser may not display it, which is unrelated to parsing.

How do GFM and CommonMark differ?

GFM builds on CommonMark and adds GitHub-specific extensions such as tables, task lists, and strikethrough; a pure CommonMark parser ignores these, so watch compatibility when moving docs across platforms.

The preview differs from GitHub rendering — why?

GitHub uses GFM extensions (task lists, strikethrough, autolinks, tables) that some Markdown implementations disable by default. Check whether your syntax is GFM; the most common gap is single-newline handling, which GitHub renders as a break and standard Markdown does not.

My table does not render even though the syntax looks right?

The delimiter row (| --- |) needs blank lines before and after, and the pipes must match the column count. The sneakiest failure is text directly above the table — the parser treats the table as a continuation of that paragraph.