Language
HTML to Markdown - Convert HTML to MD Online for Free | ButDoc

Convert HTML to Clean Markdown

Moving an article into a static site, filing documentation in a repository, or getting a web page into a notes app that speaks Markdown — all of it starts with stripping the tags. Upload your .html file above and get back readable Markdown.

Below: which Markdown flavour to aim for, what happens to the parts of a web page that have no Markdown equivalent, and how to save a page so it actually converts.

Getting the page in the first place

Most people arrive here with a URL rather than a file, and how you save it decides the whole result.

In your browser use Save Page As and choose the option described as complete or single file rather than HTML-only.

If the output comes back nearly empty, the page builds its content with JavaScript. A great many modern sites send a blank shell and fill it in after loading, so the saved copy has the layout and none of the words. Two ways round it:

  • Use reader mode first. Most browsers have one. It strips navigation, adverts and sidebars, leaving the article — then save that.
  • Copy the element from developer tools. Right-click the article, choose Inspect, find the enclosing container, and copy its outer HTML into a text file. That captures what is actually on screen.

Either route also spares you the cookie banner, the newsletter prompt and the comment section, which are all page content and otherwise arrive in your Markdown alongside the article.

What maps cleanly, and what does not

Markdown was designed to cover the structure of ordinary writing. HTML covers far more, so some of it has nowhere to go.

Converts directly: headings, paragraphs, ordered and unordered lists, links, images, blockquotes, inline code and code blocks, bold and italic emphasis, horizontal rules. Tables convert too, in the GitHub-flavored pipe syntax that most tools understand.

Has no Markdown equivalent: CSS classes and inline styles, custom fonts and colours, forms, embedded videos and iframes, JavaScript, data attributes, and the whole apparatus of responsive layout. These are dropped, which is usually the point — a repository README or a static-site post is meant to take its appearance from the site, not carry its own.

Falls back to raw HTML: anything structural with no Markdown syntax, such as a table with merged cells or a definition list. Markdown permits inline HTML, so well-behaved converters leave those elements as tags rather than losing them. That is the right trade, but it means your file is not pure Markdown — and some strict processors will not render the fallback.

Which flavour of Markdown

Markdown is not one specification. The 2004 original covered headings, emphasis, lists, links, blockquotes and code. Everything since was added by different people in different directions.

Universal — the original set works everywhere. If your destination is unknown or old, staying within it is the safe choice.

GitHub Flavored Markdown added pipe tables, task lists, strikethrough and automatic linking of bare URLs. Supported by GitHub, GitLab, most static site generators and most modern notes apps — but not by everything.

Check the destination before you commit. Tables are the common casualty: a page converted with pipe tables and pasted into a system that only supports original Markdown displays a mess of pipes and dashes. Convert one page and paste it into the real destination before doing fifty.

Images need handling separately

Markdown references images rather than containing them. ![alt](images/photo.jpg) is an instruction to fetch a file, so what happens depends entirely on the path in the original HTML.

Absolute URLs pointing at publicly reachable images keep working. Relative paths do not, unless you also move the image files and preserve the folder structure. Images embedded as base64 data URIs survive but produce enormous, unreadable Markdown files.

If you are moving content into a static site, the usual approach is to download the images, put them in the site's asset folder, and rewrite the paths — a find and replace across the converted file rather than a per-image job.

While you are there, check the alt text. It converts across from the HTML if it was written, and a great many pages leave it empty. It is the only thing a screen reader has to describe your images, and one of the few genuine SEO wins available on an image.

Why Markdown at all

Four reasons it is worth the conversion.

It is readable as plain text. A Markdown file makes sense in any editor, on any system, without rendering. That is what makes it good for documentation people will edit by hand.

It diffs properly. Version control shows exactly which words changed, because there is no markup noise around them. HTML diffs are dominated by tag changes; Markdown diffs show edits.

It is portable. The same file works in GitHub, a static site generator, a notes app, a documentation platform and a chat message.

It is durable. Plain text outlives formats. A Markdown file written today will be readable in decades, which is not true of most document formats.

Frequently Asked Questions

My converted file is nearly empty. Why?
The page builds its content with JavaScript, so the saved HTML contains the layout and none of the words. Use your browser's reader mode and save that, or copy the article element from developer tools.
Why is there still HTML in my Markdown?
Some elements have no Markdown syntax — tables with merged cells, definition lists, certain nested structures. Markdown permits inline HTML, so those are left as tags rather than discarded. Remove or simplify them if your destination is strict.
Do tables convert?
Simple ones become GitHub-style pipe tables, which GitHub, GitLab and most static site generators understand. Check your destination first — a system supporting only original Markdown will display the pipes as literal text.
What happens to images?
Markdown references images rather than containing them. Absolute URLs keep working; relative paths break unless you move the files too. For a static site, download the images, put them in your asset folder, and rewrite the paths with a find and replace.
Why did all the styling disappear?
Markdown has no concept of fonts, colours or layout — that is the point. Appearance comes from wherever the file is rendered, which is what makes the same content work in a repository, a static site and a notes app alike.
Is my file kept private?
Files are transmitted over an encrypted connection, processed automatically without human review, and permanently deleted from our servers within 60 minutes. Full detail is in our Privacy Policy.

Related tools

Markdown to PDF turns the result into a shareable document, HTML to Word suits pages destined for an editable document instead, and Word to HTML works the other way. Browse all Word tools.