HTML Markdown Swap
HTML to Markdown
Converting…
Choose a HTML file
.html, .htm, .xhtml
Convert
Download
HTML pivot preview
FAQ and format details
Why convert HTML to Markdown?
People convert HTML to Markdown when a CMS export, email newsletter, or saved article needs to live in a Git repo. Markdown diffs cleanly, searches as plain text, and is what GitHub, GitLab, and most static-site generators already render. If the source is a Word export saved as filtered HTML, this is often cleaner than opening Word again.
How this conversion runs
Scripts, iframes, and event handlers are stripped first so the hub is a document, not an app. Turndown then maps semantic tags onto GFM: h1–h6 become # headings, <pre><code> becomes a fenced block, and <table> becomes pipe tables. Classes, inline CSS, and layout divs are ignored on purpose — they have no Markdown equivalent.
Keep in mind for HTML → Markdown
Nested tables, absolutely positioned elements, and custom web-component markup will flatten or vanish. A nav menu full of lists may look like content in the Markdown. If the HTML was a pixel-perfect landing page, expect an article, not a replica. Front matter is not invented; add YAML yourself if the destination is Eleventy or Hugo.
After you have a Markdown file
Open the .md in VS Code or Obsidian and skim the first headings. If images were data URLs they will show up as huge Markdown image lines — replace those with files in a /media folder before you commit. From here, Markdown→DOCX is a common next step for stakeholders who will not read a repo.
Does this keep my CSS?
No. Markdown has no stylesheet. Presentation has to be re-applied by whatever renders the Markdown later (GitHub's defaults, a static-site theme, or Word after a further conversion).
Will JavaScript-generated HTML convert?
Only if that HTML is already in the file you drop here. This converter never executes scripts, so a blank shell page that fills itself on load will convert as an empty article.
This pair at a glance
- Accepts
- .html, .htm, .xhtml
- Writes
- .md · text/markdown
- Read fidelity
- exact (HTML → HTML)
- Write fidelity
- high (HTML → Markdown)
- Source size
- Plan for files under 7.6 MB
Runs in this browser.
Something off with this pair? Send feedback.
About HTML and Markdown
Source file
HTML
The web’s native document format: structured markup for headings, paragraphs, lists, tables, links, and media.
HTML is the pivot format for this converter. Incoming files are turned into a sanitized HTML document, and outgoing files are generated from that document. Browsers, email clients, and most rich-text editors already speak it, which is why it is the most flexible interchange point.
- Extensions
- .html, .htm, .xhtml
- MIME types
- text/html, application/xhtml+xml
- Kind
- text · utf-8
- Category
- markup
- Standard
- Open format · since 1993
- Spec
- HTML Living Standard
- Comfortable size
- Up to about 7.6 MB in this browser converter
- Read into HTML
- exact fidelity · implemented — Identity transform after sanitizing script/style that cannot round-trip into other document types.
What this format can hold
- headings
- paragraphs
- lists
- tables
- links
- images
- inline formatting
- semantic structure
Apps that consume HTML
- Chrome (Google) — opens on Windows, macOS, Linux, Android
- Firefox (Mozilla) — opens on Windows, macOS, Linux, Android
- Safari (Apple) — opens on macOS, iOS
- Edge (Microsoft) — opens on Windows, macOS
- VS Code (Microsoft) — creates on Windows, macOS, Linux
- WordPress — creates and opens on Web
Catalog notes
Destination file
Markdown
A lightweight plain-text syntax for structured writing that compiles to HTML. The lingua franca of README files, wikis, and note apps.
Markdown stores documents as readable plain text with a small set of punctuation conventions for headings, emphasis, lists, links, and code. GitHub-Flavored Markdown (GFM) adds tables, strikethrough, task lists, and fenced code blocks. Conversion through HTML is a natural fit because Markdown was designed as an HTML shorthand.
- Extensions
- .md, .markdown, .mdown, .mkd
- MIME types
- text/markdown, text/x-markdown
- Kind
- text · utf-8
- Category
- markup
- Standard
- Open format · since 2004
- Spec
- CommonMark / GFM
- Comfortable size
- Up to about 3.8 MB in this browser converter
- Written from HTML
- high fidelity · implemented — HTML is walked into GFM with Turndown.
What this format can hold
- headings
- paragraphs
- lists
- tables
- links
- images
- inline formatting
- code blocks
- blockquotes
Usually dropped on the way out
- complex css layout
- nested tables
- custom classes
Apps that consume Markdown
- GitHub (GitHub) — creates and opens on Web
- Obsidian (Dynalist) — creates and opens on Windows, macOS, Linux, iOS, Android
- VS Code (Microsoft) — creates on Windows, macOS, Linux
- Typora — creates and opens on Windows, macOS, Linux
- Notion — creates and opens on Web, Windows, macOS
- Jupyter — creates and opens on Web
- Discord — opens on Web, Windows, macOS, iOS, Android
Catalog notes
Other conversions
Other conversions from HTML: WordRTFOpenDocumentPDFEPUB
Other ways to get Markdown: WordRTFOpenDocumentPDFEPUB