Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Markdown Previewer and Markdown to HTML

Preview Markdown live and convert it to clean, safe HTML.

About the Markdown Previewer

Write Markdown and see a live preview with GitHub style tables, task lists and code blocks. Copy the sanitised HTML or download it as a standalone web page.

How to use the Markdown Previewer

  1. Type or paste Markdown into the editor.
  2. Watch the preview update as you type, or switch to the HTML tab to see the generated markup.
  3. Toggle GitHub Flavoured Markdown for tables and task lists, and line breaks to keep single new lines.
  4. Copy the HTML, or download a complete .html page with simple styling.

Examples

Convert headings and inline formatting

Input

# Hello

Some **bold** and _italic_ text with `code`.

Output

<h1>Hello</h1>
<p>Some <strong>bold</strong> and <em>italic</em> text with <code>code</code>.</p>
Convert a GFM table

Input

| Tool | Free |
| --- | :-: |
| JSON | Yes |

Output

<table>
<thead>
<tr>
<th>Tool</th>
<th align="center">Free</th>
</tr>
</thead>
<tbody><tr>
<td>JSON</td>
<td align="center">Yes</td>
</tr>
</tbody></table>
Strip unsafe HTML

Input

<script>alert(1)</script><img src="x" onerror="alert(1)">

Output

<img src="x">

Frequently asked questions

Which Markdown features are supported?

Everything in CommonMark plus GitHub Flavoured Markdown: tables, task lists, strikethrough with ~~ and automatic links. Raw HTML is allowed as long as it is safe.

Is the HTML output safe to use?

The HTML is cleaned with DOMPurify, which removes scripts, event handler attributes such as onerror and javascript: links. Still review content from untrusted sources before publishing it.

Why does a single line break not show up?

In Markdown a single new line joins lines into one paragraph. Leave a blank line between paragraphs, end a line with two spaces, or tick Line breaks to keep every new line.

What does the downloaded file contain?

A complete HTML page with your content and a small built in stylesheet, so it looks tidy when opened directly in a browser.