to your full HTML document, then Prism auto-highlights matching code blocks."}},{"@type":"Question","name":"What is the difference between CommonMark and GFM?","acceptedAnswer":{"@type":"Answer","text":"CommonMark is a standardised Markdown specification (commonmark.org) that resolves ambiguities in the original Markdown definition. GFM (GitHub Flavored Markdown) is a superset of CommonMark adding tables, task lists, strikethrough, and autolinks. marked.js supports both. For maximum compatibility across different Markdown renderers, stick to CommonMark features. Use GFM extensions only when you know your target platform supports them."}}]}
HomeFile Converter ToolsMarkdown to HTML
MD→H
File

Markdown to HTML Converter

Convert Markdown to HTML using marked.js with live rendered preview. Supports GFM (GitHub Flavored Markdown) including tables, task lists, fenced code blocks, and strikethrough. Option to wrap output in a full HTML document.

👁 Live rendered preview✅ GFM tables & tasks</> Full HTML wrap📋 Copy HTML
Converters:
🔒 100% Private — All conversion runs in your browser. No files are uploaded to any server.

📖 How to Use Markdown to HTML

  1. 1
    Type or paste Markdown

    Type or paste Markdown into the left panel. The right panel shows a live rendered HTML preview using marked.js. GitHub Flavored Markdown (GFM) is supported including tables, task checkboxes, and fenced code blocks with syntax hints.

  2. 2
    Toggle full document mode

    Raw HTML: outputs just the converted HTML fragment (the body content). Full document: wraps in a complete HTML document with <!DOCTYPE html>, <html>, <head> with title and UTF-8 charset, and <body> tags. Choose based on whether you are embedding in an existing page or creating a standalone file.

  3. 3
    Copy or download HTML

    Click Copy HTML to copy the output. Click Download .html to save as an HTML file. The output is ready to use in web pages, email templates, or documentation systems.

💡 Quick Reference

Markdown HTML
# Heading <h1>Heading</h1>
**bold** <strong>bold</strong>
[text](url) <a href="url">text</a>
```code``` <pre><code>

Frequently Asked Questions — Markdown to HTML

What Markdown features are supported?

Standard Markdown: headings (#), bold (**), italic (*), links ([text](url)), images (![alt](src)), blockquotes (>), horizontal rules (---), inline code (`code`), fenced code blocks (```). GitHub Flavored Markdown (GFM) extensions: tables (pipe syntax), task lists (- [ ] and - [x]), strikethrough (~~text~~), autolinks, and hard line breaks. HTML tags within Markdown pass through directly.

What is marked.js?

marked.js is a fast, open-source Markdown parser and compiler for JavaScript (github.com/markedjs/marked). It supports the CommonMark specification and GitHub Flavored Markdown. Used by GitHub, GitBook, and many other platforms. It runs entirely in the browser with no server required. This tool uses marked.js for reliable, standard-compliant Markdown to HTML conversion.

What is GitHub Flavored Markdown (GFM)?

GFM is GitHub's extended Markdown specification adding: tables (|col1|col2|), task lists (- [x] Done), strikethrough (~~text~~), autolinks (URLs are clickable without brackets), and fenced code blocks with language identifiers (```python). GFM is now widely adopted beyond GitHub — GitLab, Bitbucket, Notion, and many CMSs support it.

Can I use the HTML output in emails?

Partially — email clients have very limited HTML/CSS support. The raw HTML output works for basic content (paragraphs, headings, bold, links) but tables and code blocks may not render correctly in all email clients. For email-safe HTML, use inline styles and avoid CSS classes. Tools like MJML or Foundation for Emails are designed for email-compatible HTML generation.

How do I add syntax highlighting to code blocks?

marked.js converts fenced code blocks to <pre><code class="language-python"> HTML. Syntax highlighting requires a separate library like Prism.js or highlight.js. Add <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"> and <script src="...prism.min.js"></script> to your full HTML document, then Prism auto-highlights matching code blocks.

What is the difference between CommonMark and GFM?

CommonMark is a standardised Markdown specification (commonmark.org) that resolves ambiguities in the original Markdown definition. GFM (GitHub Flavored Markdown) is a superset of CommonMark adding tables, task lists, strikethrough, and autolinks. marked.js supports both. For maximum compatibility across different Markdown renderers, stick to CommonMark features. Use GFM extensions only when you know your target platform supports them.