โšกSwiftKit
โ† All Toolsโ˜• Support
๐Ÿ“Developer & Data

Markdown to HTML Previewer

Write and inspect CommonMark and GitHub Flavored Markdown with live formatted visual rendering and clean HTML export.

Load Sample:
0 words ยท 0 chars

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.

Heading
You type: # Title ## Section
You get: <h1>Title</h1> and <h2>Section</h2>
Bold
You type: **bold**
You get: <strong>bold</strong>
Italic
You type: *italic*
You get: <em>italic</em>
Strikethrough
You type: ~~old~~
You get: <del>old</del>
Inline code
You type: `code`
You get: <code>code</code>
Link
You type: [SwiftKit](https://swiftkit.tools)
You get: <a href="https://swiftkit.tools" target="_blank" rel="noopener noreferrer">SwiftKit</a>
Image
You type: ![A cat](cat.png)
You get: <img src="cat.png" alt="A cat">
Quote
You type: > A quote
You get: <blockquote><p>A quote</p></blockquote>
Bullet list
You type: * one * two
You get: <ul><li>one</li><li>two</li></ul>
Numbered list
You type: 1. first 2. second
You get: <ol><li>first</li><li>second</li></ol>
Task list
You type: - [x] done - [ ] to do
You get: <ul><li><input checked disabled type="checkbox"> done</li> ... </ul>
Divider
You type: ---
You get: <hr>
Table
You type: | A | B | | --- | --- | | 1 | 2 |
You get: <table><thead><tr><th>A</th><th>B</th></tr></thead> ... <td>1</td><td>2</td> ...
Code block
You type: ```js let x = 1; ```
You get: <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.

A single line break is ignored
You type: line one line two

What 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.

No space after the #
You type: #Title

What happens: <p>#Title</p> (plain text)

Fix: Put a space after the hashes: # Title.

A space between ] and (
You type: [text] (https://x.com)

What happens: text is not linked; only the bare address is

Fix: Remove the space: [text](https://x.com).

You want a literal asterisk
You type: \*not italic\*

What happens: *not italic* (asterisks shown as text)

Fix: 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:

Script tag
You type: hello <script>alert(1)</script> world

What you get: <p>hello world</p>

Result: The script is removed.

Event handler
You type: <img src=x onerror=alert(1)>

What you get: <img src="x">

Result: The onerror handler is removed.

javascript: link
You type: [x](javascript:alert(1))

What you get: <a ...>x</a> (no href)

Result: 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.

Knowledge Base

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.