Markdown to HTML Converter

Paste Markdown and get clean semantic HTML back, <h1> to <h6>, <ul>, <ol>, <table>, <pre><code> with highlighted syntax, <blockquote>, autolinked URLs. Choose full document (with <html>, <head> and a minimal stylesheet) or fragment (just the body content) depending on whether you’re wiring it into an existing page or producing a standalone file.

How to convert Markdown to HTML

  1. 1

    Paste Markdown

    Full document or snippet. YAML front-matter is stripped automatically if present.

  2. 2

    Pick extension set

    CommonMark only, GFM (tables, task lists, autolinks), or GFM + math.

  3. 3

    Choose output mode

    Fragment for embedding, or full HTML document with head and minimal CSS.

  4. 4

    Copy or download HTML

    Grab the HTML as text or save it as an `.html` file.

Mapping table

Markdown HTML
# Heading 1 <h1>Heading 1</h1>
**bold** <strong>bold</strong>
*italic* <em>italic</em>
`code` <code>code</code>
Fenced code with lang <pre><code class="language-js">
- item <ul><li>item</li></ul>
1. item <ol><li>item</li></ol>
> quote <blockquote><p>quote</p></blockquote>
[text](url) <a href="url">text</a>
![alt](src) <img src="src" alt="alt">
--- <hr>
GFM table <table><thead>...</thead>...
- [x] done <input type="checkbox" checked disabled>

Syntax highlighting

Fenced code blocks with language hints get a class="language-xxx" attribute on the <code> element. The converter also inlines the tokenized output from highlight.js when you toggle “pre-highlighted”, useful if the target page doesn’t load a highlighter runtime.

Full document vs. fragment

  • Fragment is the inner HTML only, start with <h1> or whatever the first element is. Paste into an existing CMS block, email body or frontend component.
  • Full document wraps the fragment in <!DOCTYPE html>, <html>, <head> with a small default stylesheet (typography, code blocks, tables). Save it as .html and it opens in any browser, no extra files needed.

Inline vs. external CSS

  • Inline styles (toggle) put all CSS directly on elements. Ugly but bulletproof for email templates.
  • Classes (default) keep the HTML clean and expect your site’s stylesheet to handle styling.

Accessibility notes

  • Headings render as semantic <h1><h6> preserving your hierarchy. Don’t skip levels in source.
  • Images without alt text produce <img alt=""> (an intentional empty alt for decorative images), but add alt text unless the image really is decoration.
  • Tables get a <thead> for the header row, improving screen-reader navigation.

Frequently Asked Questions

Yes. Raw HTML in the source is passed through with script tags and event attributes removed. If you need unsanitized output (you trust the input), there’s a toggle, don’t use it on user-supplied content.

GFM task lists (- [x], - [ ]) become <input type="checkbox" disabled> elements. The disabled attribute prevents accidental state changes in the rendered view.

Yes, enable inline styles. The converter inlines a minimal style attribute on each block, which is what email clients (Outlook, Gmail) need since they strip <style> blocks.

Enable the math extension and $x^2$ or $$...$$ blocks render via KaTeX. The converter outputs static SVG or HTML, no runtime MathJax required.

No. Parsing and HTML generation happen in your browser. The source and output never leave your device.

Related Tools

Tool available in other languages