Skip to main content
Text Tools

Markdown Preview

Render GitHub-flavoured Markdown live. Built-in sanitiser strips scripts and unsafe URLs.

No upload — your files never leave your device

  • 100% private
  • Runs in your browser
  • Works offline
  • No sign-up

SnapToolz Markdown

A fast preview, entirely in your browser.

Features

  • GitHub-flavoured Markdown
  • Live preview
  • Safe rendering — <script>, onclick, and javascript: URLs stripped
  • Tables, code blocks, blockquotes
function hello(name: string) {
  return `Hello, ${name}`;
}

Tip: paste any markdown and it renders as you type.

Item Qty Price
Coffee 2 $4
Bagel 1 $3

Try the homepage for the rest of the toolset.

About Markdown Preview

Markdown Preview renders GitHub-flavoured markdown in a live side-by-side view as you type. Headings, lists, tables, fenced code blocks with syntax highlighting, task lists, blockquotes, footnotes, and inline HTML all render exactly the way GitHub and most static-site generators show them. The output is sanitised — any embedded HTML is run through a strict filter so you can safely preview untrusted markdown from PRs, comments, or downloaded files. Copy the rendered HTML when you need to paste into a CMS that doesn't speak markdown.

  • No uploads
  • Browser-only
  • Works offline
  • 100% free

How it works

  1. 1

    Write or paste markdown

    Type into the left pane or paste an existing .md document. Drag-and-drop a .md file to load it.

  2. 2

    See the rendered preview live

    The right pane updates as you type, using GitHub Flavoured Markdown rules — tables, task lists, fenced code with language highlighting, and autolinking all work.

  3. 3

    Copy HTML or print

    Copy the rendered HTML for pasting into a CMS, or print the preview to PDF using your browser's print dialog. The CSS is print-friendly.

What Markdown is, and why it won

Markdown is a plain-text formatting syntax: you write readable text with a few lightweight marks — asterisks for emphasis, hash signs for headings, hyphens for lists — and a renderer turns it into formatted HTML. John Gruber created it in 2004 with the explicit goal that the source should be readable as-is, without looking like it's been marked up with tags. That readability is why it took over README files, GitHub issues, Reddit, chat apps and static-site generators: the raw text is still perfectly legible to a human.

The catch is that Gruber's original description left many edge cases ambiguous, so for years every tool rendered Markdown slightly differently. CommonMark was created to fix exactly that — a precise, testable specification of how Markdown should parse. If you want the authoritative rules, the spec is at spec.commonmark.org. Most modern renderers, including this one, follow it.

CommonMark vs GitHub Flavored Markdown

FeatureCommonMarkGitHub Flavored Markdown (GFM)
Headings, lists, emphasis, links, code blocksYesYes
TablesNo (not in core spec)Yes (pipe tables)
StrikethroughNoYes
Task listsNoYes
Autolinking bare URLsNoYes
Raw HTML passthroughAllowedAllowed but filtered for safety

GFM is a strict superset of CommonMark. If a table or a checkbox "doesn't work," the renderer is probably plain CommonMark.

The syntax gotchas that trip everyone up

  • Single line breaks are ignored. To get a new line within a paragraph you need either a blank line (new paragraph) or two trailing spaces. This surprises people pasting text where every sentence was on its own line.
  • A list needs a blank line before it to start a new list, and nested items must be indented consistently (typically two or four spaces). Inconsistent indentation silently flattens the nesting.
  • Characters like asterisk, underscore, backtick, hash, and the greater-than sign are special. To show a literal asterisk or underscore, escape it with a backslash. Underscores inside_a_word can accidentally trigger italics in some parsers.
  • Tables, strikethrough and task lists are GFM extensions, not core Markdown. Paste them into a CommonMark-only renderer and they appear as raw pipes and tildes.
  • Indenting a paragraph four or more spaces turns it into a code block — a frequent accident when copying indented text.

Where your Markdown will and won't render

Markdown is not a universal format — it's only formatted where something actively renders it. GitHub, GitLab, Reddit, Discord, Notion, and most static-site generators render it. A plain email client, a Word document, or a database text field does not: there, your asterisks and hashes show up as literal characters. Knowing the destination tells you whether to keep Markdown or convert it first.

When the target can't render Markdown, you need actual HTML or rich text. Convert it with Markdown to HTML and paste the HTML where it's understood. And if your Markdown contains a fenced code block of regex or another snippet you're still refining, Regex Tester is the place to get it right before you embed it.

Frequently asked questions about Markdown Preview

  • Is the HTML output safe — does it block XSS?

    Yes. The renderer sanitises the output through a strict allow-list (DOMPurify-style), stripping <script>, javascript: URLs, on* event handlers, and dangerous attributes. You can safely paste markdown from an untrusted source — an issue comment, a PR description, a downloaded README — without worrying that an embedded HTML payload will execute.

  • Which markdown flavour is used?

    GitHub Flavoured Markdown (GFM): pipe tables, fenced code with language tags, task lists ([ ]/[x]), autolinks, strikethrough (~~text~~), and footnotes. Setext-style headings and reference-style links also work. If a render differs from GitHub, it's almost always a math (KaTeX) or Mermaid diagram block — those are GitHub-specific extras that aren't enabled here.

  • Can I edit the rendered HTML directly?

    Not in this tool — the right pane is read-only preview. If you want to edit the HTML output, copy the HTML and edit it in any text editor, or use the Markdown ↔ HTML Converter for a richer two-way workflow.

Privacy, offline use, browser support, and pricing questions are answered on the site-wide FAQ.

See all Text tools