Markdown to HTML Converter
Paste Markdown below and get clean HTML instantly, plus a live preview — nothing you paste ever leaves your browser.
Preview
HTML source
A hand-written parser for the Markdown people actually write
This tool processes your input block by block — a heading line,
a fenced code block, a run of list items, a paragraph — and then
applies inline formatting (bold, italic, links, inline code)
within each block. Every character of plain text is escaped
(&, <, >)
before any tag is built, so pasted HTML or script tags always
surface as inert text rather than live markup — important
because the HTML this generates is often embedded straight into
another page. It's a deliberately honest subset rather than a
full CommonMark engine: see the FAQ for exactly what's in and
out of scope.
Worked example
Input:
# Project Notes This is **important** and *worth reading*. - First point - Second point > Remember to check the `config.json` file.
Output:
<h1>Project Notes</h1> <p>This is <strong>important</strong> and <em>worth reading</em>.</p> <ul><li>First point</li><li>Second point</li></ul> <blockquote><p>Remember to check the <code>config.json</code> file.</p></blockquote>
Frequently asked questions
Does this support the full CommonMark spec?
No, and it doesn't claim to. This tool supports the common Markdown people actually write day to day — headings, bold and italic text, links and images, unordered and ordered lists, fenced code blocks, inline code, blockquotes, and horizontal rules. It does not attempt full CommonMark spec compliance for exotic edge cases: nested lists, reference-style links ("[text][ref]" with a separate definition line elsewhere), tables, footnotes, raw HTML passthrough, and setext-style headings (underlining a line with === or ---) are all outside what this hand-written parser handles. For a README, a comment, or a blog draft, this covers it; for a document leaning heavily on those advanced features, expect some syntax to come through literally instead of being converted.
What happens if my Markdown contains literal HTML, like a <script> tag I typed by hand?
It gets shown, never run. Every character of your plain text — including any HTML tags you typed directly rather than produced through Markdown syntax — is escaped to its literal text form (< becomes <, and so on) before this tool builds any real markup. That's a deliberate security choice, not just a scope limit: this parser has no raw-HTML-passthrough feature, so there's no path for something you pasted to become a live <script> or <img onerror=...> tag in the output. The only tags that ever appear as real, live HTML are the ones this converter itself generates from actual Markdown syntax — headings, bold, links, and so on — which matters because that generated HTML is often embedded straight into someone else's page.
Is my Markdown uploaded anywhere?
No. The entire conversion — parsing your Markdown and building the HTML — runs in your browser with plain JavaScript string processing; nothing you type or paste is sent to, or stored on, a server. That matters here specifically because Markdown drafts are often unpublished posts, internal docs, or notes someone would rather not have leave their machine.
Why does the tool show both a live preview and raw HTML source?
Different jobs. The preview renders inside a sandboxed iframe (no scripts allowed, isolated from the rest of this page) so you can see how the formatting will actually look — headings, bold text, lists — without anything in your pasted content being able to affect this site. The HTML source box below it is the literal markup this tool generated, ready to copy into a template, CMS field, or static site.
How does it handle something like ***bold and italic together***?
Imperfectly, by design of the honest subset it implements. Bold (** or __) and italic (* or _) are each their own regular-expression pass rather than a single recursive emphasis parser, so at the exact boundary where three asterisks meet, the result can come out as just bold or just italic instead of both nested together. Plain **bold** and plain *italic* used separately, even in the same sentence, convert correctly and predictably — it's specifically the combined triple-marker case at the edges that this parser doesn't fully resolve.