Markdown to HTML
Convert Markdown to HTML with GitHub tables, task lists and strikethrough. Raw HTML shows as text except 17 plain tags; javascript: links become text. How it works
Use the Markdown to HTML
39 of 100,000 characters.
Hello World
Type some markdown here.
Rendered preview from markdown. Remote images are loaded from their own servers.
About the Markdown to HTML
In this Markdown to HTML converter, # Hello World becomes <h1>Hello World</h1>, **bold** becomes <strong>bold</strong> and a pipe table becomes a <table>. It uses the marked library with GitHub Flavored Markdown on, and it does not pass raw HTML through: a tag such as <span style="..."> or <script> comes out as visible text, except 17 tags without attributes such as <kbd> and <details>. Links keep only http, https, mailto, tel and relative addresses.
Markdown syntax and the HTML it becomes
| Markdown | HTML output |
|---|---|
| # Title | <h1>Title</h1> |
| ## Subtitle | <h2>Subtitle</h2> |
| **bold** | <p><strong>bold</strong></p> |
| *italic* | <p><em>italic</em></p> |
| ~~deleted~~ | <p><del>deleted</del></p> |
| `code` | <p><code>code</code></p> |
| [link](https://example.com) | <p><a href="https://example.com">link</a></p> |
|  | <p><img src="https://example.com/a.png" alt="alt text"></p> |
| - one ⏎ - two | <ul><li>one</li><li>two</li></ul> |
| 1. one ⏎ 2. two | <ol><li>one</li><li>two</li></ol> |
| > quote | <blockquote><p>quote</p></blockquote> |
| ```js ⏎ let a = 1; ⏎ ``` | <pre><code class="language-js">let a = 1;</code></pre> |
| - [x] done ⏎ - [ ] to do | <ul><li><input checked="" disabled="" type="checkbox"> done</li><li><input disabled="" type="checkbox"> to do</li></ul> |
| | a | b | ⏎ |---|--:| ⏎ | 1 | 2 | | <table><thead><tr><th>a</th><th align="right">b</th></tr></thead><tbody><tr><td>1</td><td align="right">2</td></tr></tbody></table> |
| line one ⏎ line two | <p>line one<br>line two</p> |
| --- | <hr> |
| Visit https://example.com | <p>Visit <a href="https://example.com">https://example.com</a></p> |
⏎ marks a new line in the Markdown; the line breaks between tags in the output are left out here. GFM and Line breaks are on, as they are by default.
What the converter does not pass through
| Markdown | HTML output | Tags written as text | Addresses dropped |
|---|---|---|---|
| <kbd>Ctrl</kbd> | <p><kbd>Ctrl</kbd></p> | 0 | 0 |
| <span style="color:red">red</span> | <p><span style="color:red">red</span></p> | 2 | 0 |
| <script>alert(1)</script> | <script>alert(1)</script> | 2 | 0 |
| [click](javascript:alert(1)) | <p>click</p> | 0 | 1 |
|  | <p>x</p> | 0 | 1 |
| [mail me](mailto:[email protected]) | <p><a href="mailto:[email protected]">mail me</a></p> | 0 | 0 |
| Text[^1] ⏎ ⏎ [^1]: note | <p>Text<a href="note">^1</a></p> | 0 | 0 |
| :smile: | <p>:smile:</p> | 0 | 0 |
The page counts what it wrote out as text or dropped and says so under the output. Footnote syntax is read as an ordinary reference link, and emoji shortcodes stay as text.
The allow-list
| Item | Allowed |
|---|---|
| Raw HTML tags, without attributes | abbr, b, br, del, details, em, i, ins, kbd, mark, s, small, strong, sub, summary, sup, u |
| Link addresses | http, https, mailto, tel, relative paths and #anchors |
| Image addresses | http, https and relative paths |
Frequently asked questions
- Does this converter follow CommonMark and GitHub Flavored Markdown?
- It uses the marked library, and with GFM on it converts the GitHub extensions: tables, task lists, strikethrough and bare URLs. The current specs are CommonMark 0.31.2 and GFM 0.29-gfm; the converter does not claim to pass every example in them. One difference is a setting: with Line breaks on, the default, a single new line becomes <br>, where CommonMark makes it a soft break (a space or new line) and allows a renderer option for hard breaks. Turn Line breaks off for the CommonMark result.
- Why is my HTML shown as text in the output?
- Raw HTML in the Markdown is not passed through, so pasted Markdown cannot add a form, a script or a style to the page. Only 17 tags without attributes are kept, such as <kbd>, <details>, <summary>, <sub> and <sup>. <span style="color:red">red</span> comes out as text, and a note says how many tags were written out.
- Does it support footnotes, emoji shortcodes or heading IDs?
- No. Text[^1] with a line [^1]: note is read as an ordinary reference link, <a href="note">^1</a>; :smile: stays as text; and headings get no id attribute.
- How long a document can it convert?
- Up to 100,000 characters. The conversion runs in a background worker, and a document that takes longer than 2 seconds is stopped with a message; long runs of unmatched * or _ characters, or many unclosed brackets, are the usual causes.
- Is my Markdown saved?
- Yes, in this browser’s local storage, together with the GFM and Line breaks settings, so it is there when you come back. Clear Saved Values removes it.
- What is the difference between Copy, Full page and Fragment?
- Copy and Fragment give the same HTML as the Source view, with no page wrapper: Copy puts it on the clipboard and Fragment saves it as markdown-fragment.html. Full page saves markdown-output.html, a complete document with a doctype, a title and a small stylesheet, which opens in a browser on its own.
Network use
The preview loads any remote images or other media your Markdown refers to, so the server hosting them sees your IP address. Privacy policy
Related Tools
View all toolsJSON Formatter
Paste JSON to format it with 2 spaces, 4 spaces or tabs, minify it or sort its keys. A syntax error is reported with its line, column and a caret under it.
JSON Path Query Tool
Test a JSONPath expression on your JSON and see the match count, each matching value and its path. Filters such as ?(@.price < 10) work. Up to 100 KB.
Base64 Converter
Encode text to Base64 or decode Base64 to text. UTF-8, standard and URL-safe alphabets, optional padding on decode, up to 250,000 characters.
URL Encoder/Decoder
Percent-encode or decode text as you type: one value with encodeURIComponent or a whole URL with encodeURI, and an option to read + as a space.
UUID Generator
Generate 1 to 1,000 random v4 UUIDs, or time-based v1, or name-based v5 and v3 from a namespace and a name, and copy them. Repeats of v4 are very unlikely.
ULID Generator
Generate 1 to 500 ULIDs, 26-character IDs that sort by creation time, in upper or lower case, and decode any ULID to the date it was made.