Write Markdown and see live HTML preview side by side.
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>.
document.md, exactly as typed.<h1> and <p> tags, with no page around it.markdown-export.html. It is a basic page with the title Markdown Export and your HTML inside. It has no styles, so it looks plainer than the preview.Each line below was run through the same marked version. The right column shows the HTML it produced.
| You type | HTML 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 |
 | <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] done | list 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.
line one and line two on separate lines are joined into one paragraph. End the first line with two spaces or a backslash to get a line break. Leave an empty line to start a new paragraph.--- becomes a heading. Title directly above --- gives <h2>Title</h2>, not a line. Put an empty line between them.#Title stays plain text. Write # Title.__init__ shows as a bold init. Single underscores inside a word, as in snake_case_name, are safe. Put code names in backticks.1. on every line still shows 1, 2, 3. A list that starts at 3. starts at 3.language-js. The page has no syntax highlighter.These features exist on some sites, but marked does not support them with its default settings. We checked each one:
text[^1] with [^1]: note below it does not make a footnote. It turns into a link to a page called note.id, so a link such as [jump](#head) goes nowhere in the preview or the export.> [!NOTE] stays a normal quote with the text [!NOTE] in it.:smile:, $x^2$ and ==text== stay as they are typed.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:
<img src=x onerror="alert(1)"> becomes <img src="x">. Event handlers such as onerror and onclick are removed, so no alert appears.[click](javascript:alert(1)) becomes <a>click</a>, a link with no target.<script> and <iframe> tags are removed with their content.<style> and <form> tags are removed too, so pasted text cannot hide the page or add a fake login form. The fields inside a form stay.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 ". 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.
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.
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.
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.
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.
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.
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.
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.