ToolNest logoToolNest.

Free HTML to Markdown Converter

Last updated: November 10, 2026

Quick answer: HTML is the publishing format and Markdown is the authoring format — and moving content between them by hand is slow, error-prone work: a missed closing tag here, a flattened table there, a list that loses its nesting. This free HTML to Markdown converter does the move for you: paste your HTML or upload the file and it returns clean GitHub-flavoured Markdown — headings, bold and italic, links, images, nested lists, blockquotes, fenced code blocks and tables, all converted by a real DOM parser, not by regex tag-stripping. Choose ATX or Setext headings and inline or reference-style links, then copy the result or download it as .md. Everything runs in your browser, so your documents never leave your device.

Conversions: headings become # to ###### (or === / --- for h1/h2 in Setext mode); <strong>/<b> become **bold**, <em>/<i> become *italic*, <s>/<del> become ~~strikethrough~~; links become [text](url) or [text][1] with definitions appended; images become ![alt](src); <code> becomes `code` and <pre> becomes a fenced block (language detected from class="language-..."); nested lists keep their depth with two-space indents; tables become GitHub-style tables; blockquotes, horizontal rules and line breaks are preserved. Dropped honestly: inline styles, classes, ids, data attributes, and script/style content are not carried over — Markdown has no place for them. Complex nested tables flatten to plain text. Your HTML is parsed locally — nothing is uploaded.

🔒 100% Private: Data never leaves your device.

✓ Free forever  ·  ✓ No signup  ·  ✓ Tool inputs stay in your browser — never sent to our servers.

Try next: Markdown to HTML · Markdown to Email HTML Converter · HTML Encoder / Decoder

How to Use the HTML to Markdown Converter

  1. Paste your HTML into the box, or use the file picker to load an .html / .htm file — the contents load into the editor automatically. Full documents work, not just fragments: the converter reads the body and ignores the head, scripts and styles.
  2. Pick your heading style. ATX (# Heading) is the default and the style GitHub, most static-site generators and most editors expect. Setext (Heading followed by === or ---) matches older Markdown and some documentation styles — it only applies to h1 and h2; deeper headings stay ATX either way.
  3. Pick your link style. Inline links ([text](url)) are the default and the easiest to read in place. Reference-style links ([text][1] with definitions at the end) keep long URLs out of the prose, which helps when the same URL appears several times or the document will be edited by hand.
  4. Press Convert to Markdown. The result appears instantly with a line/word count and the number of elements converted. Copy it or Download .md and drop it straight into your repo, CMS, or notes app.
  5. Check the tables and code blocks before you publish: tables become GitHub-style tables with a header row, and fenced code blocks keep their language when the HTML carries a class like language-python. The note under the output lists every conversion rule, so nothing about the output should surprise you.

Why Use Our HTML to Markdown Converter?

Common Use Cases

HTML to Markdown Converter vs Alternatives

Online converters will convert your HTML if you paste it, Turndown will convert it inside your code, and Pandoc will convert a whole directory from the terminal. For a one-off conversion with documented rules, nested lists and tables that survive, code blocks that keep their language, and zero upload of your data, this page is the fastest private route from HTML to clean Markdown.

Frequently Asked Questions

How do I convert HTML to Markdown online for free?
Paste your HTML into the box above (or upload the .html file), pick your heading and link styles, and press Convert to Markdown. The output appears instantly — headings, lists, tables, code blocks, links and images converted — then copy it or download the .md file. No signup, no install, no upload.
How are headings converted?
h1 to h6 become # to ###### in ATX mode, which is the default. In Setext mode, h1 becomes a line followed by === and h2 becomes a line followed by ---, matching the original Markdown style; h3 to h6 stay ATX either way, because Setext only defines two levels. Heading text keeps its inline formatting, so a bold word inside a heading stays bold.
How are links converted?
Inline mode gives [text](url) — the link sits in the sentence. Reference mode gives [text][1] in the sentence with a [1]: url definition appended at the end of the document, one definition per unique URL. Links with no href become plain text, and a link whose text is the URL itself becomes the bare URL in angle brackets, like <https://example.com>.
How are tables converted?
A table becomes a GitHub-style Markdown table: the header row (from <th>, or the first row when there is no header) is followed by a | --- | --- | separator, then one row per <tr>. Cell text keeps its inline formatting. Tables nested inside table cells are a real Markdown limitation — they flatten to plain text, and the page says so instead of producing a broken table.
How are code blocks handled?
Inline <code> becomes `code`, and <pre> becomes a fenced block with ``` on its own lines. If the code element carries a class like language-python, lang-js or data-lang, the language name is carried onto the opening fence, so syntax highlighting works on GitHub and in your editor. Indentation inside the block is preserved exactly.
What happens to images?
An image becomes ![alt text](src) when the 'Convert images' box is ticked, which is the default. The alt attribute becomes the bracket text, so a screen reader and a broken-image fallback both still describe the picture. Untick the box and images are skipped entirely — useful when the Markdown will live somewhere the image URLs cannot resolve anyway.
Are inline styles and classes preserved?
No — Markdown has no syntax for class names, inline styles, ids or data attributes, so they are dropped. That is the honest trade of the format: structure survives, presentation does not. If the styling matters, keep the HTML; if the content matters, Markdown is the right destination. Script and style elements are skipped entirely.
Is my data uploaded anywhere?
No. The entire conversion runs in JavaScript in your browser — the HTML never touches a server. Safe for internal docs, draft pages, CMS exports and anything else you would not paste into a stranger's upload form.