HomeTextDataDeveloperFilesMediaUtilities

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
Examples:
📄Drop .html, .htm, or .txt file here, or click to browse
0 chars
0 chars0 lines

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 ![alt](src). 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?
No. All conversion runs locally in your browser. Nothing is sent to any server.
Does it support GitHub Flavored Markdown?
Yes. Select "GitHub Flavored Markdown" in the flavor option to enable tables, task lists, and strikethrough output.
Can it convert HTML tables?
Yes. Tables are converted to GFM pipe tables with headers and alignment. Complex tables with colspan/rowspan are converted best-effort with a warning.
How are code blocks handled?
Inline code becomes backtick-wrapped text. Pre/code blocks become fenced code blocks. Language hints are extracted from class names like language-js.
Why were scripts or styles removed?
Scripts and styles have no Markdown equivalent and could be dangerous. They are removed by default and reported in diagnostics.
Can it convert messy HTML from Word or Google Docs?
Yes. The converter strips presentational spans, empty paragraphs, and redundant divs to extract clean content.
Are images downloaded?
No. Image URLs are preserved as Markdown image syntax but never fetched or downloaded.
What happens to iframes or forms?
They are removed by default and reported in the diagnostics panel. You can change this in the "Unsupported tags" option.
Can I convert Markdown back to HTML?
Yes. Use the Markdown to HTML tool for the reverse conversion.
Why does the output not look exactly like the original page?
Markdown is simpler than HTML. Styles, layout, colors, and some structural elements cannot be represented. The goal is clean, readable Markdown content.
Can I upload an HTML file?
Yes. Drag and drop an .html file onto the drop area, or click it to browse. The file is read locally.
Can I batch convert files?
Not yet. Single-file conversion is supported. Batch conversion may be added in a future update.