HTML to Markdown Converter & Sanitizer
Convert HTML markup to GitHub Flavored Markdown (GFM) and parse Markdown to HTML. Clean Word/CMS junk, format tables, code fences, and checklists.
How to Use HTML to Markdown Converter
- Choose Direction & Settings: Select HTML → Markdown or Markdown → HTML, and configure heading styles (Atx vs Setext), bullets, and code fences.
- Paste Document or Raw Code: Paste your HTML markup, Microsoft Word export, Google Docs rich-text, or Markdown syntax into the left editor pane.
- Automatic Cleansing & Parsing: The engine instantly strips bloated inline classes and mso-* attributes, building clean GFM pipe tables and syntax blocks.
- Inspect Preview & Export: Toggle between Raw Markdown/HTML and rendered visual preview, then Copy to clipboard or Download the formatted file.
Operational Limits & Specifications
| Processing Tier | Client-Side (In-Browser Execution) |
|---|---|
| Max File Size | 1 MB per file |
| Max Batch Quantity | Up to 1 files |
| Max Total Batch Size | 1 MB total |
| Supported Formats | .txt, .html, .md |
Common Use Cases
CMS to Static Site Migration
Convert legacy WordPress, Drupal, or Medium blog posts into Markdown files for Hugo, Jekyll, Astro, or Next.js blogs.
Document Authoring & README Generation
Copy formatted content from Google Docs or Notion and convert it into clean README.md documentation for GitHub repositories.
Technical Documentation Publishing
Convert complex HTML benchmark tables and API code blocks into clean GFM tables without manual pipe formatting.
Sanitizing Rich-Text Web Snippets
Strip ugly inline styling, tracking classes, and event handlers from web articles before storing in personal notes or knowledge bases.
Technical Mechanics & Architecture
Comparison with Alternatives
Tips & Troubleshooting
- Enable 'Strip Word & CMS Junk' whenever pasting rich-text content copied from Microsoft Word or desktop editors.
- Use the 'Preview' tab on the output pane to visually verify rendered typography and tables side-by-side with your code.
- Use the 'Swap' button to quickly test round-trip conversion fidelity between HTML and Markdown.
Frequently Asked Questions
How does this tool clean bloated HTML from Microsoft Word or Google Docs?
Word and Google Docs exports inject heavy proprietary styling such as mso-* attributes, MsoNormal paragraphs, and inline font sizes. Our DOM cleaner purges these non-standard wrapper tags and attributes, extracting the pure semantic text, headings, and lists into pristine Markdown.
Does the converter support GitHub Flavored Markdown (GFM) tables?
Yes. Standard HTML <table>, <thead>, <tbody>, <tr>, <th>, and <td> structures are converted into clean GFM pipe tables with colons (:---, :---:, ---:) denoting left, center, or right column alignment.
Can I convert Markdown back into semantic HTML5 markup?
Yes. Click the 'Swap' button or select 'Markdown → HTML5' mode. The built-in parser converts headings, code fences, blockquotes, lists, tables, and inline emphasis back into clean, semantic HTML5 tags.
What happens to HTML tags that have no direct Markdown equivalent?
When the 'Allow Raw HTML Tags' option is active, tags without direct Markdown syntax (such as <details>, <summary>, <kbd>, <mark>, <sub>, and <sup>) are preserved as raw HTML within your Markdown output, as supported by CommonMark and GFM specifications.
Are code blocks converted with syntax highlighting language tags?
Yes. When HTML <pre><code class="language-xyz"> is detected, the converter extracts the language identifier (e.g. csharp, javascript, python, sql) and formats the output into standard ```xyz fenced blocks.
Is any of my document data sent to a server?
Never. The conversion runs entirely client-side using browser DOMParser and regex tokenization. Your text, articles, and sensitive technical documentation never leave your device.