Markdown to HTML Converter

Convert Markdown to HTML, or HTML back to Markdown. Full CommonMark + GFM — tables, fenced code blocks with syntax highlighting, task lists, strikethrough. Copy or download output.

0 words 0 chars 0 lines
Markdown
Preview

Markdown Quick Reference

# Heading 1→ <h1>
**bold**→ <strong>
*italic*→ <em>
~~strikethrough~~→ <del>
`inline code`→ <code>
```lang\ncode\n```→ highlighted block
[text](url)→ <a href>
![alt](url)→ <img>
> blockquote→ <blockquote>
- [x] task→ checkbox list
| col | col |→ <table>
---→ <hr>

Markdown to HTML Converter — CommonMark Compliant

This converter works in both directions. Markdown → HTML: uses marked.js, one of the most widely adopted Markdown parsers, implementing the full CommonMark specification plus GitHub Flavored Markdown (GFM). HTML → Markdown: uses Turndown.js with ATX heading style (#), fenced code blocks (```), and proper handling of tables, links, images, and nested lists. Switch directions using the toggle above the editor.

HTML to Markdown Converter

The HTML → Markdown tab accepts any HTML input and converts it to clean, readable Markdown. Common uses: converting blog posts or documentation to Markdown for a static site generator; extracting readable text from HTML emails; migrating content from a CMS to a Markdown-based system; or simply cleaning up HTML into a more portable format. The converter handles headings, bold, italic, links, images, code blocks, blockquotes, ordered and unordered lists, and tables.

This converter uses marked.js, one of the most widely adopted Markdown parsers in the JavaScript ecosystem. It implements the full CommonMark specification plus GitHub Flavored Markdown (GFM) extensions. Unlike regex-based converters, marked.js handles edge cases correctly: nested inline formatting, code blocks with backticks inside code spans, deeply nested lists, and complex table structures all parse as specified.

Supported Markdown Syntax

Full CommonMark: headings H1–H6, paragraphs, bold (** or __), italic (* or _), bold-italic (***), inline code (`), fenced code blocks with language identifier (```python), blockquotes (>), ordered lists, unordered lists (-, *, +), nested lists, horizontal rules (---), links, reference links, images, HTML passthrough. GFM extensions: tables with alignment, task lists (- [x] / - [ ]), strikethrough (~~), autolinks.

Syntax Highlighting for Code Blocks

Code blocks with a language identifier are automatically syntax-highlighted using highlight.js, supporting 190+ languages including JavaScript, Python, TypeScript, Java, Go, Rust, C/C++, SQL, Shell, YAML, JSON, CSS, HTML, PHP, Ruby, and more. In the preview, hover over the code block to see the detected language. Syntax highlighting is applied in the HTML source output as inline CSS classes compatible with any highlight.js theme.

Download Complete HTML File

The "Download .html" button wraps the converted output in a complete, valid HTML5 document with <!DOCTYPE html>, <meta charset="UTF-8">, viewport meta, and a clean embedded stylesheet that styles headings, code blocks, tables, and lists. The downloaded file opens correctly in any browser without any external dependencies.

Frequently Asked Questions

Paste your Markdown in the left editor. The HTML preview appears on the right instantly. Click "Copy HTML" for the raw HTML source, or "Download .html" for a complete standalone file.
Full CommonMark plus GFM: headings, bold, italic, strikethrough, inline code, fenced code blocks with syntax highlighting, blockquotes, ordered/unordered/task lists, tables, links, images, and HTML passthrough.
Yes — tables, task lists (checkboxes), strikethrough, and fenced code blocks with language identifiers are all GFM extensions supported here.
marked.js v9 — a CommonMark-compliant parser used by millions of developers and projects. It correctly handles edge cases that regex-based converters get wrong.