HTML to Markdown Converter
Convert HTML documents and fragments into clean GitHub Flavored Markdown with tables, code blocks, links, images, and lists.
About This Tool
Converts raw HTML snippets, CMS exports, and documentation fragments into clean, readable CommonMark and GitHub Flavored Markdown.
Uses a deterministic HTML tokenizer that strips <script>, <style>, and HTML comments while preserving headings, emphasis, code fences with language classes, task lists, blockquotes, and tables.
Key Features
- Full block & inline coverage: Handles h1-h6, p, strong/b, em/i, del/s, code, pre, a, img, ul, ol, checkbox task lists, blockquote, table, and hr.
- GFM table reconstruction: Converts <table>, <thead>, <tbody>, <tr>, <th>, and <td> structures into Markdown pipe tables.
- Language-aware code fences: Extracts class="language-*" from <pre><code> blocks to emit tagged fenced code blocks.
- Script & style stripping: Automatically removes <script>, <style>, and <!-- comment --> blocks before generating Markdown.