HTML to Markdown Converter
Convert HTML to Markdown
About this tool
This free HTML to Markdown Converter runs the conversion writers actually face — taking the tagged-up HTML that piles up everywhere and turning it into clean, readable Markdown — pasted in one side, Markdown out the other, live and instant. HTML is the format content arrives in when it comes from anywhere: a web page copied for reference, an exported document, an email's source, a CMS's stored content, a scraped page's markup. And Markdown is the format writers want it in: plain text that reads like writing, works in every notes app and editor, versions cleanly in Git, pastes into platforms that speak the format natively — GitHub, Reddit, Discord, Notion, Obsidian, static-site generators. The reverse direction — Markdown into HTML — is the build step every pipeline handles; this one — HTML back into Markdown — is the rescue direction, and it is where hand-copied text goes to die: copying a web page by hand loses structure wholesale, and pasting HTML into a Markdown-only field produces either tag soup or stripped headings. This converter does the translation mechanically: headings become '# ' lines, bold and italic become asterisks, lists become dashes and numbers, links become '[text](url)', code blocks stay code blocks. The converting itself is an exercise in what to keep and what to throw away, because HTML carries far more than structure — and Markdown wants none of it. Every class, id, style attribute, span, div and script tag is layout machinery that Markdown has no place for, and the converter strips it in favor of the semantic structure underneath: the heading becomes a heading regardless of the classes it wore; the bold text becomes **bold** whether it arrived in a strong tag, a styled span or a b. The edge cases are where converters distinguish themselves: nested lists convert with their indentation intact; tables become Markdown's pipe syntax with headers preserved; links with titles carry them; images convert to their alt-text-and-URL form; and the entities HTML hides — &, <, the numeric character references — decode into the characters they represent, so the output reads as text rather than markup debris. The result is Markdown that reads as if it was written, not extracted — the output you'd have produced by hand, minus the hour of it. The workflows this tool fits span every kind of HTML rescue: the writer saving a web article's content into their notes or second brain as clean Markdown, readable and editable in the tools they actually write in; the content migrator moving a site or blog from an HTML-based platform to a Markdown-based one — static-site generators, Markdown CMS — where hundreds of posts need converting, not retyping; the developer converting documentation, changelogs and HTML readme content into the Markdown their repos and wikis live in; the researcher and student capturing web sources with structure intact — headings, lists, links — rather than flattened text; the email and newsletter writer stripping an HTML email into readable Markdown notes; and the everyday rescue — the pasted page that arrived as tag soup, the exported doc that needs to become a draft, the forum post that must be Markdown by tomorrow. Paired with the site's Markdown to HTML Converter for the reverse direction and the Word Counter for counts, this is the other half of the format-bridging pair. Everything runs locally in your browser. Every conversion is computed by client-side JavaScript on your device — the HTML you paste never reaches a server, is never logged and never stored. Disconnect from the internet after the page loads and the converter keeps converting. Close the tab and nothing remains anywhere.
Frequently asked questions
How do I convert HTML to Markdown?+
Paste the HTML into the input, and the Markdown appears instantly — no clicks, no settings, nothing to configure: headings become '# ' lines, **bold** and *italic* become asterisks, lists become dashes and numbers, links become '[text](url)', images become their alt-and-source form, code blocks stay fenced and intact, and tables become Markdown's pipe syntax. The conversion runs live, so edits to the pasted HTML re-convert immediately, and one click copies the Markdown result. What disappears on the way: every class, style attribute, span, div and script — the layout machinery Markdown has no use for — leaving only the semantic structure a reader would recognize. The loop — paste, glance, copy — takes seconds, and the Markdown that comes out reads as if written rather than extracted, which is the standard the conversion is built to.
What HTML elements convert, and which get stripped?+
Semantic structure converts; presentation machinery gets stripped — and the split is the entire philosophy of the conversion. Converting: headings (h1–h6 to their matching # levels), strong and em to ** and *, links, images, ordered and unordered lists with nesting, blockquotes, code blocks and inline code, tables to pipe syntax, and horizontal rules. Stripped: every class, id and style attribute; span, div and font tags whose only content is layout; scripts and styles entirely; comments; and the invisible scaffolding HTML pages carry. The subtle case is the tag that pretends to be structure: a 'bold' paragraph achieved with inline styles converts to plain text, because Markdown's bold means the strong element, not a visual style — and the converter reads the semantics, not the styling. The practical result: what survives the conversion is exactly what a Markdown file can represent, and nothing else — which is why the output reads clean where a naive tag-strip would read broken.
How do I convert an entire web page into Markdown?+
Grab the page's HTML — view-source and copy it, or use the browser's 'copy outer HTML' on the article's container — paste it here, and the page becomes Markdown: headings, lists, links and paragraphs, with every nav bar, footer, script and style block stripped away as the machinery it is. The workflow scales from a paragraph to a whole page, and the conversion is the same either way, which makes it the standard first step for archiving web content: capture the HTML, convert, and the result pastes into any notes app, Markdown editor or static-site project as if it was written there. Two practical tips shape the quality of the result: pasting the article's main container rather than the entire page source keeps the nav-and-footer noise out of the conversion entirely; and pages built by JavaScript-heavy frameworks may need the rendered HTML — from the browser's inspector rather than the raw source — since the raw source sometimes contains little but scaffolding. Convert, copy, and the web page is now a Markdown document.
How do I migrate a blog or site from HTML to Markdown?+
Post by post, with this converter doing the mechanical part — the migration that used to require scripting becomes a paste-and-copy loop. The workflow: export the old platform's posts as HTML, run each through the converter, and the Markdown emerges ready for the destination — a static-site generator, a Markdown-based CMS, a Git-backed content repo — where each result is saved as a .md file with its front matter added. The conversion preserves what content needs: headings keep their levels, links keep their targets, images keep their sources, and the code blocks that technical posts depend on survive intact. Two realities shape the job: bulk migrations of hundreds of posts are where this becomes a real pipeline rather than a one-off — and even then, the tool handles the posts that scripts mangle; and every migration needs a manual pass regardless, since embedded widgets, shortcodes and platform-specific embeds are exactly the content no converter can translate — they arrive as stripped, and get rebuilt at the destination. The converter turns the mechanical 90% into seconds, and the human pass handles the last 10% that was always going to need eyes.
Why does my converted output have extra blank lines or spacing?+
Because HTML's spacing is layout and Markdown's spacing is structure — and the conversion normalizes one into the other, which sometimes produces more vertical space than the source displayed. HTML paragraphs separated by margin and padding convert to paragraphs separated by blank lines, because that is how Markdown marks the same structure; nested lists and blocks carry the blank lines that Markdown's grammar requires between constructs; and HTML sources full of empty paragraphs — the 'spacing divs' hand-built layouts use — convert to exactly the blank lines they semantically are. The cleanup, when the output looks gappy: a pass through the site's Remove Extra Spaces tool collapses repeated blank lines in one step, which is the natural companion workflow. The deeper point: the output's spacing is Markdown structure, not the source's layout — and documents that read gappy usually contain spacing machinery the conversion has finally made visible, and removable.
Can I convert HTML tables, code and nested lists?+
Yes — the three constructs hand-conversion always mangles, handled completely. Tables convert to Markdown's pipe syntax: headers become the header row, the dashed separator appears, and each row becomes a pipe-delimited line — with the caveat that Markdown tables have no merged cells, so HTML's colspan and rowspan constructions flatten into repeated cells, which is the lossy edge of an otherwise faithful translation. Code blocks — both pre-formatted blocks and inline code — convert to fenced blocks and backticks, with whitespace and indentation preserved, which is the survival that matters for technical content. Nested lists convert with their hierarchy intact: sub-items keep their indentation, mixed ordered-and-unordered nests keep their markers, and the deep nesting that hand-conversion turns into flat mush survives as structure. These three are where the converter earns its keep — the constructs that make 'I'll just copy it by hand' fail — and they convert mechanically, every time.
Does the converter handle malformed or messy HTML?+
Mostly, with grace — real-world HTML arrives broken constantly, and the converter parses with the leniency a browser would: unclosed tags, mismatched pairs, stray angle brackets and nested mistakes are forgiven as they are parsed, and the structure that can be salvaged converts. The parser reads the HTML the way a browser's parser does — constructing the tree from what is there rather than what the spec requires — which is why pastes from scraped pages, old exports and hand-built layouts convert rather than error. The limits are the limits of meaning: markup too broken to parse into structure produces partial results, and content whose semantics are irrecoverable — a heading built from styled divs, a list faked with dashes in styled paragraphs — converts to what it literally is, plain text, because the structure was never in the markup to find. For the everyday reality of HTML from the wild — messy, unclosed, half-styled — the conversion is robust, and the output is the clean Markdown the content deserved.
Is the HTML I paste stored or sent anywhere?+
No — nothing leaves your device. Every conversion runs entirely in your browser with client-side JavaScript: the HTML you paste is never transmitted to any server, never logged and never stored. You can verify it directly: after the page loads, disconnect from the internet and the converter keeps working, which is only possible because no network is involved. Close or refresh the tab and everything is gone — no history kept on this site or anywhere else. Web pages, exported documents and proprietary content are as private here as they would be in a local text editor on your own machine — which matters for this tool more than most, since the HTML worth converting often comes from sources that were never meant to leave your hands.