October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

How to Convert a Website to Markdown

Use Pandoc for local HTML, a browser converter for a quick public URL, or an API for repeatable extraction. Learn what each method captures and how to check the resulting Markdown.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a local HTML file, convert it with Pandoc: pandoc -f html -t markdown page.html -o page.md. For a URL, Pandoc can read the page directly, but JavaScript-rendered content may need a browser-based extractor or API. Most simple converters handle one page at a time—not a whole website—so choose a crawl or migration workflow if you need multiple pages.

Choose a method for the page you have

Situation Good starting point What to watch for
You already have an HTML file Pandoc on the command line Complex tables and some formatting may not convert exactly.
You need one public page converted quickly A browser-based URL converter Check whether it renders JavaScript and whether it can access the page.
You need repeatable or integrated conversion An extraction API Confirm current syntax, access options, limits, and pricing.
You need many pages or a site archive A crawl or migration workflow Do not assume a one-URL converter will capture an entire site.

The key distinction is how the page is obtained. A local converter can transform HTML already on disk; a URL extractor must fetch the page, and may need to run it in a browser to see content inserted by JavaScript.

Convert an HTML file with Pandoc

Pandoc is a command-line tool and library for converting between markup and document formats, including HTML and Markdown. Its guide documents HTML-to-Markdown conversion. See the Pandoc User’s Guide for installation and format options.

  1. Install Pandoc using the official instructions for your operating system.
  2. Save or obtain the source HTML file, for example page.html.
  3. Run pandoc -f html -t markdown page.html -o page.md.
  4. Open page.md and compare headings, links, images, code, and tables against the source.

Here, -f html selects the input format, -t markdown selects Markdown output, and -o page.md writes the result to a file. Pandoc supports multiple Markdown flavors; if the result is for GitHub or a publishing system, check the target platform’s syntax and Pandoc’s format options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Convert a URL directly

Pandoc’s official demo shows reading a web page as HTML and writing a text file. Adapt the URL and output name:

pandoc -s -r html https://pandoc.org/ -o example12.text

For Markdown output, use an output name ending in .md and specify the target format, as in pandoc -s -r html -t markdown https://example.com/ -o page.md. The official demo’s example uses .text; its documented command is here.

This route works best when the desired text is present in the fetched HTML. If the page’s main content appears only after JavaScript runs in a browser, the fetched HTML may not contain it; use a browser-rendering extractor or an option that waits for the content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a browser-based converter for one public page

A web converter is usually the least setup for a one-off page: enter a public URL, let the service fetch, render, and extract it, then copy or download the Markdown. Firecrawl’s converter describes this workflow for articles, documentation, news, landing pages, and product pages. Its free tool is for publicly accessible pages; its FAQ says login-protected or paywalled content is not accessible through that tool. An API may support custom headers or cookies for content you are authorized to access, but a converter does not grant permission or bypass access controls. See Firecrawl’s website-to-Markdown converter.

For JavaScript-heavy sites, choose a converter that renders the page in a browser or lets you wait for a target element. Jina Reader documents a URL-prefix pattern using r.jina.ai, along with controls to wait for selected elements, extract selected elements, or remove selectors such as navigation and footers. Inspect the output on your own target page; extraction quality depends on the page. Details are in Jina Reader’s documentation.

Automate conversion through an API

Firecrawl with Python

Firecrawl’s tutorial demonstrates requesting Markdown with its Python SDK and writing the returned string as UTF-8. The exact SDK syntax and API requirements can change, so follow the current tutorial for installation, authentication, and request details: Firecrawl’s HTML-to-Markdown tutorial.

The tutorial described a free allowance of 1,000 credits per month and one credit per page scraped when checked on 2026-10-03. Those are vendor-published plan terms, not independent usage measurements; verify current limits and pricing before adopting the service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cloudflare Browser Run Markdown endpoint

Cloudflare documents a Markdown endpoint that can accept a URL or raw HTML; its raw-HTML example posts an html field and returns a Markdown string. This is an API-oriented option rather than the simplest route for a single casual conversion. See Cloudflare Browser Run’s Markdown documentation for endpoint details and current request format.

Make the output a file

Whatever API you use, the general file step is to take the returned Markdown string and write it as UTF-8 text with a .md extension. Preserve the source URL alongside the file if you are building an archive or content pipeline; this makes it easier to trace and refresh a converted page. Check the provider’s current response format rather than assuming every endpoint returns the Markdown in the same field.

When you need a whole website, not one page

A website-to-Markdown conversion can mean anything from extracting a single URL to migrating many linked pages. The examples above primarily convert one page per request. For a site archive or documentation migration, first identify the pages to include, then check whether the selected tool supports crawling or whether you must supply URLs individually. Plan to retain useful links and source-page references, and review output page by page; a successful conversion of the home page does not establish that the rest of the site was captured.

Check the Markdown before using it

  • Confirm the page title and heading levels are present and in a sensible order.
  • Open several links to verify their destinations are still useful.
  • Check that image references have meaningful destinations or were intentionally omitted.
  • Inspect code blocks, lists, and tables, especially wide or nested tables.
  • Look for navigation, cookie notices, chat widgets, and footer text that may crowd out the main content.
  • If text is missing, determine whether it loads after the initial HTML response; try browser rendering or waiting for a specific element.

Conversion is not guaranteed to preserve every detail. Pandoc explains that its intermediate document model is less expressive than some source formats, so perfect conversion is not always possible and complex tables may not fit its simpler model. Treat the Markdown as an extraction to review, not a proof that every page element survived.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a clean screenshot of a page rather than Markdown extraction, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; it does not convert the page to Markdown. The API can render pages in a browser, which can help when a screenshot needs rendered page content.

Example cURL call (replace the target URL and API key):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request parameters. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for 1,000 free screenshots a month, with no card required.

Troubleshooting common conversion problems

The Markdown is empty or missing the main text

The content may be inserted by JavaScript after the initial HTML loads. Try a browser-rendering extractor, or configure a wait-for-element control if the service offers one. A plain HTML fetch cannot extract text that is not in the response it reads.

The output is mostly navigation or boilerplate

Use an extractor that can select the main content or remove unwanted selectors. Jina Reader documents both selected-element extraction and selector removal. Review the result after changing selectors so that you do not remove article content by mistake.

A page requires a login or subscription

Do not treat a public converter as a way around access controls. Use an API with authorized credentials only if the service supports it and you have legitimate access; otherwise, use an allowed export or obtain permission.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Tables or formatting look wrong

Markdown has a more limited structure than many web pages, and converters may simplify complex tables or styling. Compare the result with the source; if exact layout matters, keep the original HTML or another source format as well.

The command cannot find the input file or cannot fetch the URL

For a local conversion, check that the terminal is in the directory containing the HTML file or supply its correct path. For a URL conversion, confirm the URL is reachable and that the page does not require a session or other access the command lacks. Use an authorized browser-rendering or API workflow when the page’s access or rendering behavior requires it.

FAQ

Does converting a website to Markdown preserve images?

It may preserve image references, but check that the Markdown contains useful image paths and that they still resolve. The output should be reviewed against the source page.

Is a Markdown conversion the same as a screenshot?

No. Markdown extraction produces text and document structure; a screenshot preserves a visual rendering as an image or PDF. Choose based on whether you need content for text workflows or a visual record.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.