Skip to content

HTML to Markdown converter

HTML to Markdown now uses our document engine with sandboxed file access, so semantic body markup becomes GFM without fetching remote includes.

  • Converted with Document engine · input deleted within 24 h
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Headings Kept

    The h1 and h2 elements became # and ## Markdown headings with their visible text intact.

  • Nested lists Kept

    The ordered checklist kept its numbering, and nested ul items became indented Markdown bullets.

  • Tables Changed

    The rowspan service cell became a blank first column in the second GFM table row.

  • Block quotes Kept

    The blockquote paragraph converted to a Markdown quote line without the cite attribute.

  • Code blocks Kept

    The pre/code sample became a fenced Markdown code block marked with js.

  • Inline styling Changed

    Strong became Markdown bold and del became strikethrough, while styled span, sup, and u stayed as raw HTML.

  • Images Changed

    The data-URI image stayed as a raw img tag with its alt text and inline border style.

  • Page chrome Lost

    The nav links and footer note were absent from the Markdown output.

  • Scripts and includes Lost

    The script content did not appear, and our document engine's sandbox prevents remote iframe or include fetching.

  • Warnings Kept

    The API forwarded X-Warnings as an empty JSON array for both tested HTML inputs.

Sample conversions

Operations handoff HTML

Input
1,620-byte HTML document with headings, nav, nested lists, blockquote, rowspan table, pre/code, styled span, sup, del, u, data-URI image, footer, and script.
Output
The 761-byte Markdown had # and ## headings, nested bullets, a GFM table with a blank rowspan cell, a fenced js block, raw span/sup/u/img HTML, and no nav, footer, or script text.

Feedback Atlas page

Input
Repository sample HTML with a title, h1, board-prep paragraph, metrics table, and unordered list.
Output
The 250-byte Markdown kept the h1 as a heading, made Prepared for bold, escaped dollar signs in the table, and converted both list items to bullets.

A real HTML → Markdown run

We converted our HTML sample (490 B) with Document engine on 2026-09-11. It took 14 ms and produced a 250 B Markdown file, 49% smaller than the input. The engine raised no warnings.

Input · sample.html · 490 B

Standalone document with 1 heading, 1 paragraph, 1 table, 0 links, 0 images

Headings
1
Paragraphs
1
Tables
1
Links
0
Images
0
Standalone document
yes

Output · sample.md · 250 B

1 heading, 1 table, 2 list items, 0 code blocks, 0 image references

Headings
1
Tables
1
List items
2
Code blocks
0
Images
0
Lines
8

First lines of the output

md
# Feedback Atlas — Q3 activity trail

**Prepared for:** Board of Directors

| Metric | Q2     | Q3     |
|--------|--------|--------|
| ARR    | \$4.1M | \$4.9M |
| NRR    | 108%   | 113%   |

- Enterprise pipeline doubled.
- CSAT held at **94%**.

Options and when to change them

flavour
Use when the Markdown writer should be gfm, commonmark, or our document engine markdown instead of the default GFM output.

Do it yourself

pandoc

bash
pandoc input.html -f html -t gfm -o output.md

Run with sandboxing for untrusted HTML so iframes, remote includes, and external resources are not fetched during conversion.

HTML to Markdown by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Document engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=html&to=md.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.html" -F "from=html" -F "to=md" \
  --output output.md
API reference

When this is the wrong conversion

  • If the HTML page chrome is important, inspect the Markdown because nav and footer content may be dropped.
  • If the HTML includes dynamic JavaScript-rendered content, save the rendered DOM first because static converters do not run the page.
  • If the goal is a Word handoff, /convert/html-to-docx preserves more structure than a Markdown intermediate.

HTML to Markdown questions

Does HTML to Markdown now produce real Markdown?

Yes. The updated route produced # headings, Markdown bullets, a GFM table, and a fenced code block from the rich HTML fixture.

How does our document engine handle rowspan in HTML tables?

It flattens the table for Markdown. In the tested rowspan table, the repeated worker cell became an empty first column on the second row.

Are scripts, iframes, or remote includes fetched?

No. The document engine runs sandboxed, the script body did not appear in the output, and remote include fetches are not allowed.

Why are some inline tags still HTML?

Our document engine keeps raw HTML when GFM has no clean equivalent or when inline style should not be guessed away. The rich run left styled span, sup, u, and the data-URI image as HTML.