Convert Markdown to HTML

Paste Markdown and get standards-compliant HTML plus a rendered preview. GitHub Flavored Markdown is on by default, so tables, task lists, strikethrough and fenced code blocks all work. The preview strips anything executable; the HTML output is the converter raw result, ready to paste into a template.

✓ Runs in your browser — nothing uploaded Free, no sign-upNo watermark

Matches how GitHub comments and chat apps behave.

How to use the Markdown to HTML

  1. Paste or type Markdown in the input box.
  2. HTML appears in the output box as you type, with a rendered preview below.
  3. Tick "single line breaks" if your source comes from a chat app or GitHub comment.
  4. Copy the HTML, or download it as a file.

Which Markdown this follows

The converter implements CommonMark plus the GitHub Flavored Markdown extensions, which is the dialect most people actually write. That means fenced code blocks with a language hint, pipe tables, task lists (- [x] done), strikethrough with double tildes and automatic linking of bare URLs — on top of the original Markdown syntax for headings, emphasis, lists, blockquotes and links. Indented code blocks, reference-style links and inline HTML all behave as CommonMark specifies.

MarkdownHTML produced
# Title<h1>Title</h1>
**bold** and *italic*<strong>…</strong>, <em>…</em>
[text](/url "title")<a href="https://example.com" title="title">
three backticks + js<pre><code class="language-js">
| a | b | table<table><thead>…

The line-break option

In standard Markdown a single newline inside a paragraph is just a space; you need two trailing spaces or a blank line to force a break. Chat apps, GitHub comments and most note-taking tools instead treat every newline as a line break. If your text looks like it has lost its formatting — an address collapsing onto one line, for example — turn on "treat single line breaks as br".

Sanitise before you publish

Markdown is a superset of HTML: anything you write in angle brackets passes straight through, including <script>, <iframe> and onerror attributes, and [click](javascript:…) produces a live link. That is by design and is not a flaw in the converter. If the Markdown came from a user, run the HTML through a sanitiser such as DOMPurify in the browser or an allowlist-based cleaner on the server before rendering it. The preview on this page is sanitised for exactly that reason — scripts, frames, embedded objects, event handlers and javascript: URLs are removed — while the HTML in the output box is left untouched so you can see what the converter really produced.

Where the output goes

The HTML has no classes and no wrapper, so it drops straight into a template, an email builder, a CMS rich-text field or a static-site build step. Headings carry no ids; if you need anchor links, add them in your template or with a slug generator. Code blocks keep their language-* class, which is what Prism and highlight.js look for.

Frequently asked questions

Which Markdown flavour is supported?

CommonMark plus GitHub Flavored Markdown: tables, task lists, strikethrough, fenced code blocks and autolinks.

Is the HTML safe to publish directly?

Not if the Markdown came from someone else. Raw HTML, including script tags, passes through by design — sanitise it with DOMPurify or a server-side allowlist first.

Why did my line breaks disappear?

Standard Markdown joins single newlines into one paragraph. Tick the line-break option to render each newline as a br.

Does it add ids to headings?

No. Output is plain semantic HTML with no classes or generated ids, so it fits any template.

Privacy

This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.

Last updated 2026-09-23.