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.
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.