HTML to Markdown
Convert HTML files to Markdown format.
How to Convert HTML to Markdown
Paste your HTML
Drop an .html file or paste markup โ from a page, CMS export or email.
Conversion runs locally
Tags are translated to clean Markdown syntax in your browser.
Copy the Markdown
Use the result in READMEs, wikis, notes apps or static site generators.
Conversion in this direction is lossy
HTML can express far more than Markdown. Classes, inline styles, data attributes, nested layout containers, forms, iframes and scripts have no Markdown equivalent, so they are either dropped or passed through as raw HTML.
That loss is usually the point. Converting to Markdown is how you strip presentation and keep structure โ turning a page full of wrappers and utility classes back into headings, paragraphs and lists that can live in a documentation system or a plain text file.
What survives and what does not
Headings, paragraphs, emphasis, links, images, lists, blockquotes and code blocks all have direct equivalents and convert cleanly. Simple tables convert to Markdown tables, provided the flavour you are targeting supports them.
Complex tables do not. Merged cells, nested tables and tables used for layout have no representation, and the result is either flattened or left as HTML. Anything whose meaning depended on styling โ a coloured warning box, a two-column comparison โ arrives as undifferentiated text.
Content copied from the web brings baggage
HTML pasted from a browser or a word processor is usually full of wrapper elements, inline styles and non-breaking spaces. Converting produces Markdown littered with stray raw HTML and odd spacing that looks fine until it is rendered somewhere else.
Non-breaking spaces are the sneakiest: they are invisible in the output and are not ordinary spaces, so text alignment and search behave strangely afterwards. Cleaning the source before converting is easier than cleaning the Markdown after.
Links and images need attention
Relative links and image paths convert as they are, which means they point at the original site's structure and will break wherever the Markdown ends up. Anything intended to survive the move needs absolute URLs, and images usually need to be downloaded and re-hosted rather than hot-linked.
Anchors pointing to sections within the original page are the same problem in miniature: they convert into links to fragments that no longer exist.
Why convert at all
Markdown is plain text, so it works with version control, shows meaningful diffs, and is readable without rendering. Migrating documentation out of a CMS, archiving articles or moving content into a static site are all cases where that matters more than the styling being lost.
Conversion runs in your browser, so internal pages and client content are not uploaded anywhere. Expect to tidy the result by hand โ a clean conversion is a starting point, not a finished document.
Characters that need escaping
Markdown assigns meaning to characters that appear innocently in ordinary prose. An asterisk in a maths expression, an underscore inside a variable name, a hash at the start of a line, a square bracket around an aside โ each of these turns into formatting when the Markdown is rendered.
A conversion that does not escape them produces a document that looks right as text and renders wrongly. Code and technical writing suffer most, because they are full of exactly those characters. Rendering the converted Markdown once and comparing it against the original page is the check worth doing before trusting a batch conversion.