Markdown to HTML Previewer
Write and inspect CommonMark and GitHub Flavored Markdown with live formatted visual rendering and clean HTML export.
What is Markdown?
A lightweight formatting language that turns plain text symbols (like # for headings or ** for bold) into formatted documents.
Dual-Format Copying
Use Copy HTML to paste clean source code into CMSs like WordPress or Webflow. Use Copy Rich Text to paste directly into Google Docs or Word.
Privacy First
Everything renders locally inside your browser memory. Uploaded notes, drafts, or documentation never touch an external server or database.
Markdown syntax and the HTML it produces
Each row is something you can type into the editor. The last column is the HTML this previewer generates for it, which you can see on the Raw HTML tab.
# Title
## Section<h1>Title</h1> and <h2>Section</h2>**bold**<strong>bold</strong>*italic*<em>italic</em>~~old~~<del>old</del>`code`<code>code</code>[SwiftKit](https://swiftkit.tools)<a href="https://swiftkit.tools" target="_blank" rel="noopener noreferrer">SwiftKit</a><img src="cat.png" alt="A cat">> A quote<blockquote><p>A quote</p></blockquote>* one
* two<ul><li>one</li><li>two</li></ul>1. first
2. second<ol><li>first</li><li>second</li></ol>- [x] done
- [ ] to do<ul><li><input checked disabled type="checkbox"> done</li> ... </ul>---<hr>| A | B |
| --- | --- |
| 1 | 2 |<table><thead><tr><th>A</th><th>B</th></tr></thead> ... <td>1</td><td>2</td> ...```js
let x = 1;
```<pre><code class="language-js">let x = 1;</code></pre>| Element | You type | You get |
|---|---|---|
| Heading | # Title
## Section | <h1>Title</h1> and <h2>Section</h2> |
| Bold | **bold** | <strong>bold</strong> |
| Italic | *italic* | <em>italic</em> |
| Strikethrough | ~~old~~ | <del>old</del> |
| Inline code | `code` | <code>code</code> |
| Link | [SwiftKit](https://swiftkit.tools) | <a href="https://swiftkit.tools" target="_blank" rel="noopener noreferrer">SwiftKit</a> |
| Image |  | <img src="cat.png" alt="A cat"> |
| Quote | > A quote | <blockquote><p>A quote</p></blockquote> |
| Bullet list | * one
* two | <ul><li>one</li><li>two</li></ul> |
| Numbered list | 1. first
2. second | <ol><li>first</li><li>second</li></ol> |
| Task list | - [x] done
- [ ] to do | <ul><li><input checked disabled type="checkbox"> done</li> ... </ul> |
| Divider | --- | <hr> |
| Table | | A | B |
| --- | --- |
| 1 | 2 | | <table><thead><tr><th>A</th><th>B</th></tr></thead> ... <td>1</td><td>2</td> ... |
| Code block | ```js
let x = 1;
``` | <pre><code class="language-js">let x = 1;</code></pre> |
Four mistakes that make Markdown look wrong
If the preview does not look the way you expected, it is usually one of these. The results below are what this previewer really shows.
line one
line twoWhat happens: <p>line one line two</p> (one paragraph)
Fix: End the first line with two spaces to get a <br>, or leave a blank line for a new paragraph.
#TitleWhat happens: <p>#Title</p> (plain text)
Fix: Put a space after the hashes: # Title.
[text] (https://x.com)What happens: text is not linked; only the bare address is
Fix: Remove the space: [text](https://x.com).
\*not italic\*What happens: *not italic* (asterisks shown as text)
Fix: A backslash in front of a symbol makes it plain text.
| Problem | You type | What happens | Fix |
|---|---|---|---|
| A single line break is ignored | line one
line two | <p>line one line two</p> (one paragraph) | End the first line with two spaces to get a <br>, or leave a blank line for a new paragraph. |
| No space after the # | #Title | <p>#Title</p> (plain text) | Put a space after the hashes: # Title. |
| A space between ] and ( | [text] (https://x.com) | text is not linked; only the bare address is | Remove the space: [text](https://x.com). |
| You want a literal asterisk | \*not italic\* | *not italic* (asterisks shown as text) | A backslash in front of a symbol makes it plain text. |
Pasting Markdown you did not write
Markdown is allowed to contain raw HTML, so a file from someone else could carry something harmful. This previewer cleans the HTML before it is shown or exported. For example:
hello <script>alert(1)</script> worldWhat you get: <p>hello world</p>
Result: The script is removed.
<img src=x onerror=alert(1)>What you get: <img src="x">
Result: The onerror handler is removed.
[x](javascript:alert(1))What you get: <a ...>x</a> (no href)
Result: The dangerous address is removed.
| Input | You type | What you get | Result |
|---|---|---|---|
| Script tag | hello <script>alert(1)</script> world | <p>hello world</p> | The script is removed. |
| Event handler | <img src=x onerror=alert(1)> | <img src="x"> | The onerror handler is removed. |
| javascript: link | [x](javascript:alert(1)) | <a ...>x</a> (no href) | The dangerous address is removed. |
Links open in a new tab and cannot reach back to this page. Forms, embedded frames and styling attributes are removed too. A quick look at any file in the Raw HTML tab shows exactly what will be exported.
Related: count the words in your draft with the word counter, estimate how long it takes to read with the reading time calculator, or tidy a long list with the line sorter.
Frequently Asked Questions
What Markdown features does the previewer support?โผ
Headings, bold and italic, lists, links, images, code blocks, blockquotes, tables and task lists (checklists) in the GitHub style. The Syntax Cheat Sheet sample shows each one.
Is it safe to preview Markdown I did not write?โผ
The HTML is cleaned before it is shown. Scripts, forms and event handlers are removed, and links open in a new tab with no access to this page.
Can I export the rendered HTML?โผ
Yes. Copy or download the HTML. The preview is shown exactly as it will be exported.
Can I open a .md file?โผ
Yes. Use Upload File to load a Markdown file. It is read in your browser and not uploaded.
Is my data sent to a server?โผ
No. The previewer runs entirely in your browser, so nothing you enter is uploaded, stored or tracked. Once the page has loaded it keeps working without a connection.
What is the difference between Markdown and HTML?โผ
HTML is the markup language web pages are built from, with tags such as <h1> and <strong>. Markdown is a shorthand for writing the same structure with simple symbols, so # Title becomes <h1>Title</h1>. Markdown is quicker to write and read as plain text, and a tool like this one converts it to HTML for you.
Why did my line break disappear?โผ
In Markdown a single line break inside a paragraph is treated as a space, so two lines run together. To force a break, end the first line with two spaces, or leave a blank line to start a new paragraph. The examples on this page show both.
What is the difference between Copy HTML and Copy Rich Text?โผ
Copy HTML copies the markup as text, which is what you paste into a website editor's HTML or code view. Copy Rich Text copies the formatted result, with real headings, bold and links, which you paste straight into Google Docs, Word or an email.
Does it support GitHub-style Markdown?โผ
Yes. Beyond the basics it handles the common GitHub additions: tables, task lists with checkboxes, strikethrough, fenced code blocks and automatic links. Features that only exist on one website, such as GitHub's @mentions or issue references, are not interpreted.