Text Tool

HTML to Markdown Converter Free

Convert HTML to clean Markdown syntax instantly. Handles headings (h1–h6), bold, italic, links, images, inline code, code blocks, blockquotes, ordered and unordered lists, and tables. Strips style attributes, scripts, and empty tags. Runs entirely in your browser.

Live conversion Runs in browser Data never uploaded Download .md

HTML Input

Markdown Output

Pro — full webpage scrape to Markdown, custom rules, batch conversion, API access

API access · Priority queue · Team workspace

Upgrade — $19/mo

How It Works

STEP 1

Paste HTML

Paste any HTML fragment or full HTML document into the input panel. Common sources include copying HTML from a CMS editor, exporting HTML from a word processor, fetching HTML from a web page's source, or extracting HTML from an email template. You can paste a complete document including <html> and <body> tags, or just a content fragment — both are handled correctly. Click Sample HTML for a demo.

STEP 2

Automatic Conversion

The converter parses the HTML using the browser's own DOM parser (the same engine that renders web pages) for maximum accuracy. It then traverses the DOM tree, converting each element to its Markdown equivalent: <h1>–<h6> to heading markers, <strong>/<b> to **bold**, <em>/<i> to *italic*, <a> to links, <code> to backticks, <pre> to fenced code blocks, <blockquote> to > quotes, and <ul>/<ol> to list syntax. Style attributes, scripts, and empty tags are stripped.

STEP 3

Copy or Download

Copy the clean Markdown output to clipboard for pasting into GitHub, GitLab, Notion, Obsidian, Bear, or any Markdown-aware editor. Or download it as a .md file. The stats bar shows the HTML input size and Markdown output size — Markdown is typically 30–60% smaller than the equivalent HTML because it has no closing tags, no attribute syntax, and no wrapper elements.

HTML to Markdown Features

DOM-based conversion for accurate, clean Markdown output from any HTML source

Full Element Coverage

Converts all standard HTML content elements: headings <h1>–<h6> to # through ######, <strong>/<b> to **bold**, <em>/<i> to *italic*, <a> to [link](url), <img> to ![alt](src), <code> to `backtick`, <pre><code> to fenced blocks, <blockquote> to > prefix, <ul><li> to - lists, <ol><li> to 1. numbered lists, <hr> to ---, <br> to two spaces + newline, and <table> to pipe tables.

DOM-Based Parsing

Uses the browser's built-in HTML parser (DOMParser) instead of regex-based text processing. This means malformed HTML, unclosed tags, and browser-normalized HTML are all handled correctly — the same way the browser itself would handle them. The resulting DOM tree is then traversed to produce clean, well-structured Markdown without the common errors that pure regex-based converters produce on complex HTML.

Clean Output

Style attributes, class attributes, <script> tags, <style> blocks, HTML comments, <head> content, <nav>, <footer>, and <aside> elements are stripped. Empty paragraphs and redundant whitespace are collapsed. The output is clean Markdown focused on semantic content, making it suitable for documentation systems, README files, and content migration tasks where presentational HTML markup is unwanted.

Table Conversion

HTML <table> elements are converted to pipe-delimited Markdown tables with automatic column width calculation and separator rows. <thead> rows become the header row and <tbody> rows become data rows. <th> cells are distinguished from <td> cells. The resulting Markdown tables render correctly in GitHub, GitLab, Notion, and most Markdown-aware editors that support GFM table syntax.

Nested Element Handling

Handles nested HTML structures: nested lists (multi-level <ul><li><ul>) are converted with proper 2-space indentation for each level. Bold within italic, links within headings, code within list items, and other common nesting patterns are handled correctly by the recursive DOM traversal. This produces Markdown that faithfully represents the structure of the original HTML content.

100% Private

All HTML parsing and Markdown generation runs in your browser. No HTML is transmitted to any server, logged, or stored. Safe for converting proprietary CMS content, confidential documentation, internal web pages, and HTML email templates that contain sensitive content which must not be processed by external tools or cloud services.

Free vs Pro

FeatureFreePro
Full HTML element conversion
Tables, lists, code blocks
Convert by URL (page scrape)
Custom conversion rules
Batch file conversion
REST API access

Frequently Asked Questions

Common use cases: migrating content from an HTML-based CMS (WordPress, Squarespace) to a Markdown-based system (Jekyll, Hugo, Docusaurus, Notion); converting HTML email templates to Markdown for editing; extracting readable content from web pages for use in documentation; converting HTML documentation to Markdown for storing in a Git repository; and converting HTML that was exported from Word or Google Docs into clean Markdown for version-controlled writing.

Yes — the tool uses the browser's DOM parser which handles complete HTML documents. The <head> section (title, meta tags, scripts, styles) is stripped and only the <body> content is converted to Markdown. Navigation (<nav>), sidebars (<aside>), footers (<footer>), and header elements (<header>) are skipped to focus on the main content. This is similar to a reader mode that extracts just the article content.

All HTML attributes are stripped during conversion — class names, inline styles, data-* attributes, id attributes, and aria attributes are not included in Markdown output. Only semantically meaningful attributes are preserved: href for links, src and alt for images, and language labels for code blocks. This produces clean, portable Markdown that is not tied to any specific CSS framework or design system.

HTML tables are converted to GFM (GitHub Flavored Markdown) pipe tables. The <thead> row becomes the header row, followed by a separator row of dashes and pipes, followed by the <tbody> data rows. Each cell is separated by pipe characters. The resulting table renders correctly in GitHub README files, GitLab, Notion, Obsidian, and most Markdown editors that support the GFM table extension. Complex tables with merged cells (colspan/rowspan) are simplified to a basic grid.

Elements without a Markdown equivalent are handled differently: <div> and <span> have their content preserved but the tags are stripped. <script>, <style>, <iframe>, <svg>, and <canvas> are removed entirely. <figure> and <figcaption> are treated as paragraphs. <dl>/<dt>/<dd> (definition lists) are converted to a readable list format. <video> and <audio> are converted to links using the src attribute.

Yes — all parsing and conversion runs in your browser. No HTML is transmitted to any server. The HTML is parsed in an isolated document context using DOMParser, which does not execute any embedded scripts. Safe for converting proprietary CMS pages, internal documentation pages, confidential HTML email templates, and any HTML content that must not be sent to external services for processing.