← BlogTutorials

Convert Any Webpage to Markdown in One Click

BMBest Markdown Team6 min readTutorials
A browser window converting a webpage into a clean Markdown document in one click.

There are plenty of ways to convert a webpage to Markdown, and most of them are worse than they look. Pasting raw HTML into an online converter hands you a wall of <div> soup, navigation menus, and cookie banners. Saving the page and running it through a command-line tool means installing something and learning flags. The fastest path — the one we built our Chrome extension around — is to capture the page you're already looking at and turn it into clean Markdown in a single click. No copy-paste, no code, no leaving the tab.

The one-click way to convert a webpage to Markdown

Here's the whole workflow, start to finish:

  1. Install the extension — add the HTML to Markdown extension to Chrome (it works in any Chromium browser, and a Firefox build ships too).
  2. Open the page you want to capture — an article, documentation, a release note, a recipe, anything rendered in the browser.
  3. Click the extension icon. It reads the live page, extracts the main content, and converts it to Markdown. The .md is ready to copy, preview, or edit immediately.

That's it. Because the extension works on the rendered page — the DOM your browser already built — it captures content that loads via JavaScript, which is exactly what trips up "save as HTML" approaches. The result is portable plain text you can drop into a README, a notes app, a pull request, or an AI prompt.

Why one click matters: the friction in most conversion tools isn't the conversion — it's the ceremony around it. View source, copy, switch tabs, paste, clean up. Removing those steps is the entire point.

Why copy-paste and online converters fall short

Try the obvious thing — select the article, copy, paste into a converter — and you'll quickly hit the reasons it doesn't scale. We ran hundreds of real pages through both naive copy-paste and the extension while building it, and the same failure modes showed up again and again:

  • Navigation and chrome bleed in. Headers, sidebars, "related articles," newsletter prompts, and footers all get swept up with the content you actually wanted. You spend more time deleting than you saved.
  • Links break. Relative URLs like /docs/intro become dead links once the Markdown leaves the site, because there's no base URL to resolve them against.
  • Code blocks lose their language. A syntax-highlighted snippet collapses into an unlabeled blob, so the fence loses its js or python hint and your renderer can't color it.
  • Whitespace turns to noise. Copy-paste from a browser carries invisible formatting that shows up as stray hard breaks and doubled blank lines in the raw file.

Online "paste your HTML" converters have a different problem: they need the HTML source, which most readers never see. And when you do feed them raw markup, they convert everything — including the <nav> and the ad slots — because they have no concept of what the article is. The tool that wins is the one that decides what to keep before it converts.

Side-by-side comparison: a messy Markdown dump full of navigation links and broken relative URLs on the left, a clean article-only Markdown file on the right.
Left: raw copy-paste, complete with nav menus and dead relative links. Right: the same page after main-content extraction.

How webpage-to-Markdown conversion actually works

Under the hood, a good one-click converter is a short pipeline, and each stage earns its place:

  1. Capture the DOM. A content script reads the live, fully-rendered page — not the original HTML the server sent. This is why JavaScript-rendered content (single-page apps, lazy-loaded sections) comes through intact.
  2. Extract the main content. Before converting anything, the page is stripped down to the article body — headings, paragraphs, lists, code, tables, images — and the navigation, sidebars, and footers are dropped. This single step is the difference between a clean file and a mess.
  3. Convert HTML to Markdown. The cleaned HTML is run through a converter (we use Turndown under the hood) that maps each element to its Markdown equivalent: <h2> to ##, <strong> to **bold**, <pre><code> to a fenced block, and so on.
  4. Normalize the output. Relative links are resolved to absolute URLs, code fences keep their language hint, and whitespace is collapsed so the raw file reads as cleanly as it renders.
A four-stage horizontal flow diagram: Capture DOM, Extract main content, Convert with Turndown, Normalize output, ending in a clean .md file.
The conversion pipeline: capture the rendered DOM, extract the article, convert, then normalize.

If you want to go deeper on the HTML-source side of this — converting markup you already have, rather than a live page — we wrote a companion piece on converting HTML to Markdown.

Convert a webpage to Markdown: step by step

Let's walk through a real capture. Say you're reading a long documentation page and you want just the "Getting started" section as Markdown for your own notes.

  1. Open the page and let it finish loading.
  2. Click the extension icon in your toolbar. The popup shows the converted Markdown for the page's main content.
  3. Want only part of the page? Use the select-area tool to draw a box around the exact section — a single section, a table, a code sample — and the extension converts only what you highlighted.
  4. Copy or open in the editor. Copy the Markdown straight to your clipboard, or send it to the online editor to tweak it with a live preview before you save.
The HTML to Markdown extension popup showing converted Markdown next to a browser page, with the select-area tool highlighting one section of an article.
The select-area tool captures one region of a page instead of the whole article.

Tip: if the captured Markdown needs a quick cleanup — trimming a stray heading, fixing a table — paste it into the online editor and watch the live preview update as you edit.

Converting webpages to Markdown for ChatGPT & Claude

The use case that's exploded lately: feeding web content to AI models. Large language models read Markdown far more reliably than raw HTML, and there's a practical reason to convert before you paste.

HTML is expensive in tokens. Every <div class="...">, every inline style, every tracking attribute is tokens the model has to chew through — tokens that crowd your context window and add nothing to meaning. Stripping a page down to clean Markdown typically removes the large majority of that markup. In our own testing, a content-heavy page often shrinks to well under half its original token count once it's converted, which means more of your context budget goes to the actual content and less to structural noise.

It also makes the model's job easier. A Markdown heading is unambiguously a heading; a <div> styled to look like one is a guess. Clean structure in means better summaries, extraction, and Q&A out. The workflow is the same one click — capture the page, copy the Markdown, paste it into ChatGPT or Claude as context. We go deep on the token math and prompt structure in our guide to feeding web pages to ChatGPT and Claude.

Common mistakes (and how to avoid them)

A few things people get wrong when they start converting webpages to Markdown:

  • Converting before the page finishes loading. On lazy-loading pages, capture too early and you'll miss content that hasn't rendered yet. Let it settle first — scroll to the bottom if a section loads on demand.
  • Grabbing the whole page when you wanted one section. If you only need a table or a single section, use select-area. Converting the full page and then deleting 80% of it defeats the purpose.
  • Ignoring relative links. If your tool doesn't resolve relative URLs, every in-page link breaks the moment the file leaves the site. Check that /docs/intro became https://example.com/docs/intro.
  • Expecting pixel-perfect layout. Markdown is structural, not visual. Multi-column layouts, custom callout boxes, and decorative styling flatten to a single readable column — that's the format working as intended, not a bug.
ApproachCaptures JS contentStrips nav/adsKeeps code fencesSteps
Copy-paste → converterNoNoRarely5+
Online "paste HTML" toolNoNoSometimes4+
One-click extensionYesYesYes1

FAQ

How do I convert a webpage to Markdown for free? Install a browser extension like our HTML to Markdown extension, open the page, and click once. It's free, runs entirely in your browser, and needs no account.

Can I convert a webpage to Markdown without an extension? Yes — you can save the page's HTML and run it through a command-line tool like Pandoc, or paste the HTML source into an online converter. Both work but take more steps and won't strip navigation or ads automatically.

Does converting a webpage to Markdown keep images and links? Yes. Links are preserved and resolved to absolute URLs so they don't break, and images come through as Markdown image syntax pointing at their original source.

Is it safe to convert webpages to Markdown in the browser? With our extension the conversion happens locally, in your browser — the page content isn't uploaded to a server. That's the privacy benefit of doing it client-side instead of through an online tool.

What's the best way to get a webpage into ChatGPT or Claude? Convert it to Markdown first. Markdown drops most of the token-heavy HTML markup, so more of your context window goes to the actual content — and models parse Markdown structure more reliably than raw HTML.


Converting a webpage to Markdown should take one click, not a five-step copy-paste ritual. Capture the rendered page, strip it to the content that matters, and you've got portable plain text that works everywhere — from your notes to your README to your next AI prompt. Want the output to stay tidy? Follow the 9 rules for clean Markdown. Ready to try it? Grab the Chrome extension, or start in the online editor if you'd rather paste and polish.

Share
BM

Best Markdown Team

We build free, privacy-first tools for writing and converting Markdown. Made for developers, by developers.