Convert Markdown to HTML online
Render Markdown to sanitised HTML with a live preview, GitHub tables and task lists, heading anchors and an optional full styled document.
- Runs in your browser
- Files are never uploaded
- Free, no account
Used for the <title> tag in full-document mode.
Tables, task lists, strikethrough and autolinks.
Matches how comments render on GitHub and Slack.
Lets you deep-link to #each-section.
Wraps the output with doctype, meta tags and embedded styles.
Markdown input
HTML fragment
How to convert Markdown to HTML
- Type or paste Markdown on the left, or drop a
.mdfile. The preview renders as you type. - Choose the flavour. GitHub-flavoured Markdown adds tables, task lists, strikethrough and autolinks on top of CommonMark.
- Switch to the HTML tab to see the sanitised markup, indented if you prefer.
- Turn on “Full HTML document” if you want a complete, styled page rather than a fragment to paste into a template.
Markdown syntax reference
| Markdown | HTML |
|---|---|
# Title | <h1>Title</h1> |
**bold** | <strong>bold</strong> |
_italic_ | <em>italic</em> |
~~struck~~ | <del>struck</del> (GFM) |
[text](url) | <a href="url">text</a> |
 | <img src="src" alt="alt"> |
`code` | <code>code</code> |
| Triple backticks | <pre><code>…</code></pre> |
> quote | <blockquote> |
- item | <ul><li> |
1. item | <ol><li> |
- [x] done | Checked checkbox item (GFM) |
| Pipe table | <table> with alignment (GFM) |
--- | <hr> |
What the sanitiser removes
Markdown allows raw HTML, so a converted document can carry anything the author wrote — including a
script tag. Every result here passes through an allowlist sanitiser before it is shown or offered for
download. Elements outside the allowlist (script, style, iframe,
object, form and the rest) are dropped, every on* attribute is
stripped, and URLs are checked so javascript: can never survive in an href.
Links opening in a new tab get rel="noopener noreferrer". When anything is removed you are
told how much, rather than left to guess.
Line breaks: the option everyone looks for
In standard Markdown a single newline is just whitespace — two lines of prose join into one paragraph.
To force a break you end a line with two spaces or a backslash. GitHub comments, Slack and most chat
tools instead treat every newline as a <br>, which is why pasted text often renders
differently than expected. The “Single newline = <br>” toggle switches between the two behaviours.
Fragment or full document?
The default output is a fragment: headings, paragraphs and lists with no wrapper, ready to drop into a
template, an email builder or a CMS field. Switch on Full HTML document and you get a doctype,
<meta charset> and viewport tags, a <title> you control, and an
embedded stylesheet with sensible measure, spacing, code blocks and tables — plus a
prefers-color-scheme dark variant. Save it as .html and it is a finished page
that opens correctly straight from disk.
Heading anchors
Every heading gets a slugified id — “Getting started” becomes
id="getting-started" — so you can link to #getting-started from a table of
contents or from another page. Duplicate headings are numbered so no two ids collide.
Private and offline
Rendering happens with marked running in this tab. Drafts, release notes and internal documentation are never transmitted, and the page keeps working after you disconnect. Converting the other way? HTML to Markdown handles that.
Questions
Is the HTML output safe to publish?
Yes. Every result passes through an allowlist sanitiser that removes script, style and iframe elements, all on* event handlers and any javascript: URL, and reports what it stripped.
Which Markdown flavour is used?
CommonMark plus GitHub extensions: pipe tables, task lists, strikethrough and autolinks. Turn GFM off for strict CommonMark behaviour.
What does the “Full HTML document” toggle add?
A doctype, charset and viewport meta tags, a title, and an embedded stylesheet that looks good in both light and dark mode — a complete page you can open straight from disk.
Why do my single line breaks disappear?
That is standard Markdown: a single newline is treated as a space. Enable “Single newline = <br>” to get the behaviour used by GitHub comments and chat apps.
Can I link to individual headings?
Yes. Heading anchors are on by default, so every heading gets a slugified id such as #getting-started that you can link to directly.