Back to All Tools

Markdown Editor & Previewer

Write Markdown and see live HTML preview side by side.

100% Private — Your data never leaves your browser. Everything runs locally on your device.
Start typing to see a live preview...

How the editor works

The preview is made by marked, an open-source Markdown library. The page loads marked version 15.0.12 from the jsDelivr CDN. The version is fixed, so the output does not change when marked publishes a new release. It runs with its default settings. GitHub Flavored Markdown (GFM) is on, so tables, task lists, strikethrough and bare links work. Single line breaks are not turned into <br>.

Markdown cheat sheet

Each line below was run through the same marked version. The right column shows the HTML it produced.

You typeHTML result
## Heading 2<h2>Heading 2</h2> (use 1 to 6 # signs)
**bold** and *italic*<strong>bold</strong> and <em>italic</em>
~~deleted~~<del>deleted</del>
[FreeToolPoint](https://freetoolpoint.com)a link
![Alt text](photo.png)<img src="photo.png" alt="Alt text">
`code`<code>code</code>
three backticks + js, code lines, three backticks<pre><code class="language-js">
> quoted<blockquote>
- item on each line<ul> list
1. first, 2. second<ol> list
- [ ] todo and - [x] donelist items with checkboxes (you cannot tick them)
| A | B |, then |---|---|, then | 1 | 2 |<table> with a header row
--- with an empty line above it<hr>
\*not italic\**not italic* as plain text

For a table, a colon in the second row sets the alignment. |:---|---:| makes the first column left-aligned and the second right-aligned.

Results that surprise people

What is not supported

These features exist on some sites, but marked does not support them with its default settings. We checked each one:

Raw HTML and safety

Markdown allows raw HTML, and marked passes it through unchanged. So before the HTML reaches the preview, Copy HTML or Download HTML, the editor cleans it with DOMPurify version 3.4.16. DOMPurify is a widely used HTML sanitizer, a library that removes code that could run. It also loads from jsDelivr with a fixed version.

What the cleaning does, with results we checked:

Safe HTML is kept, for example <b>, <kbd>, <details>, images, tables and style attributes. Normal Markdown gives the same result as before. Headings, lists, tables, task lists, code blocks and links are not changed. In Copy HTML, a few characters may be written differently, for example a " in plain text instead of &quot;. The page shows the same thing.

If the cleaning library cannot load, for example on a blocked network, the preview shows a message instead of uncleaned HTML.

Using it for a GitHub README

The preview is close to what GitHub shows for tables, task lists, strikethrough, code blocks and bare links. The differences are the ones listed above: no footnotes, no heading anchors, no alerts and no emoji codes. Both GitHub and this editor remove unsafe HTML, but GitHub removes more. For example, it drops style attributes, which this preview keeps. Check the final result on GitHub before you rely on the layout.

Frequently Asked Questions

Which Markdown flavor does the editor use?

The preview is made by the marked library, version 15.0.12, with its default settings. GitHub Flavored Markdown is on, so tables, task lists, strikethrough and bare links work. Footnotes, heading anchors, emoji codes and math are not supported.

Is my text saved?

No. The text stays in the page only while it is open. It is not sent to a server and not stored in your browser, so a reload or closing the tab loses it. Use Download Markdown to keep a copy.

Why is my line break ignored?

In Markdown, a single line break inside a paragraph is treated like a space. End the line with two spaces or a backslash to force a line break, or leave an empty line to start a new paragraph.

Is it safe to paste Markdown from other sources?

Yes, for viewing and exporting. The HTML is cleaned with the DOMPurify library before it is shown, copied or downloaded. Scripts, event handlers such as onerror, javascript: links, style tags and forms are removed. Safe HTML such as bold text, tables and images stays. Still read text from others before you publish it.

What is in the downloaded HTML file?

A basic HTML page with UTF-8 encoding, the title Markdown Export and your converted content, cleaned the same way as the preview. It has no styles, so it looks plainer than the preview, and code blocks are not colored. Copy HTML gives only the content, without the page around it.

Will the preview match GitHub?

It is close for headings, lists, tables, task lists, strikethrough and code blocks. GitHub adds heading anchors, alerts, emoji codes and footnotes, which this editor does not. Both remove unsafe HTML, but GitHub removes more, such as style attributes. Check the final file on GitHub.