HTML to Markdown Converter Privacy: local processing only
Convert HTML to clean Markdown locally in your browser. Supports GitHub Flavored Markdown with tables, task lists, code fences, and formatting options.
Conversion Options
How It Works
What This Tool Does
This converter parses HTML using the browser's built-in DOMParser into an inert document (no scripts execute, no resources load), then recursively walks the DOM tree and converts each element to its Markdown equivalent using configurable rules.
CommonMark vs GitHub Flavored Markdown
CommonMark is the standard Markdown specification. It supports headings, paragraphs, bold, italic, links, images, lists, blockquotes, code blocks, and horizontal rules.
GitHub Flavored Markdown (GFM) extends CommonMark with tables (pipe syntax), task lists (checkboxes), strikethrough (~~text~~), and autolinks. Select GFM mode when your Markdown will be rendered on GitHub, GitLab, or similar platforms.
Tables, Task Lists, and Strikethrough
HTML tables are converted to GFM pipe tables with proper headers, alignment markers, and escaped pipe characters. Task lists use checkbox inputs inside list items to generate - [x] and - [ ] syntax. The <del>, <s>, and <strike> tags become ~~strikethrough~~.
Code Blocks and Language Hints
Inline <code> elements become backtick-wrapped text. <pre><code> blocks become fenced code blocks. Language hints are extracted from class names like language-js, lang-python, or highlight-css and added after the opening fence.
Links, Images, and Relative URLs
Links become [text](url) or reference-style links depending on your settings. Images become . If you provide a base URL, relative links and image sources can be resolved to absolute URLs.
Handling Messy CMS or WYSIWYG HTML
HTML from Word, Google Docs, Notion, or CMS editors often contains extra <span> tags, inline styles, empty paragraphs, and redundant <div> wrappers. This tool strips presentational markup and extracts the semantic content, producing clean Markdown.
What Cannot Be Represented in Markdown
Markdown is intentionally simpler than HTML. Some features are lossy:
- CSS styles, colors, and custom fonts are discarded.
- Complex table layouts with colspan/rowspan cannot be perfectly represented in pipe tables.
- Forms, iframes, embedded media, and scripts are removed by default.
- Custom attributes and data attributes are not preserved.
The diagnostics panel shows what was stripped or converted with warnings.
Privacy and Local Processing
All parsing and conversion happens in JavaScript in your browser. No HTML, Markdown, file contents, or diagnostics are sent to any server. The DOMParser creates an inert document that does not execute scripts or load external resources. Verify in DevTools → Network tab.
FAQ
Is my HTML uploaded?
Does it support GitHub Flavored Markdown?
Can it convert HTML tables?
How are code blocks handled?
language-js.