HTMLโ†’Markdown

How to Download HTML Pages for Conversion

Before you can convert HTML to Markdown, you need the HTML files on your machine. This guide covers every common method โ€” from one-click browser saves to full recursive site mirrors. Pick the approach that matches your scenario.

Method 1: wget โ€” Recursive Site Mirroring

Best for: documentation sites, product manuals, developer references โ€” any site with a clear URL hierarchy.

Basic Command

wget -r -np -k -E \
  -w 0.5 --random-wait \
  https://docs.example.com/en/latest/

What the Flags Do

FlagPurpose
-rFollow links recursively
-npNever ascend above the starting path (stay inside the docs section)
-kRewrite links to point at local files
-EAppend .html to extensionless URLs so the converter can detect them
-w 0.5Wait 0.5 seconds between requests
--random-waitRandomize the delay so it looks less automated

Skip Images and Assets (Recommended)

You only need the HTML. Reject binary files to save bandwidth and disk space:

wget -r -np -k -E \
  --reject-regex '\.(png|jpe?g|gif|svg|webp|woff2?|ttf|css|js|zip|pdf)$' \
  -w 0.5 --random-wait \
  https://community.denodo.com/docs/html/browse/latest/en/vdp/developer/index

Limit Crawl Depth

For large sites, limit how deep wget follows links:

# Only 2 levels deep from the start URL
wget -r -np -k -E -l 2 \
  -w 0.5 --random-wait \
  https://docs.example.com/en/latest/

Installing wget

SystemCommand
macOSbrew install wget
Ubuntu/Debiansudo apt install wget
Windowswinget install JernejSimoncic.wget

Method 2: curl โ€” Download a List of URLs

Best for: when you have a specific list of pages (from a sitemap, a table of contents, or a URL file).

Download from a URL List

# urls.txt โ€” one URL per line
https://docs.example.com/page-1.html
https://docs.example.com/page-2.html
https://docs.example.com/api/reference.html
# Download all pages, preserve directory structure
while IFS= read -r url; do
  path=$(echo "$url" | sed 's|https\?://[^/]*/||')
  mkdir -p "$(dirname "downloaded/$path")"
  curl -s -o "downloaded/$path" "$url"
  sleep 0.5
done < urls.txt

Extract URLs from a Sitemap

# Pull URLs from sitemap.xml
curl -s https://docs.example.com/sitemap.xml \
  | grep -oP '<loc>\K[^<]+' \
  | grep '\.html' \
  > urls.txt

Method 3: Browser โ€” Save Individual Pages

Best for: a handful of pages, or sites that require login/authentication.

  1. Open the page in Chrome/Firefox/Edge
  2. Press Ctrl+S (Windows/Linux) or โŒ˜+S (macOS)
  3. Choose "Web Page, HTML Only" (not "Complete" โ€” you don't need images/CSS)
  4. Save to a folder
  5. Repeat for each page, or use a browser extension for batch saving

Browser Extensions for Batch Saving

Method 4: HTTrack โ€” GUI Website Copier

Best for: users who prefer a graphical interface over the command line.

  1. Download HTTrack from httrack.com (Windows/Linux/macOS)
  2. Enter the starting URL and configure filters (HTML only)
  3. Let it mirror the site
  4. Find the HTML files in the output folder

Method 5: Puppeteer/Playwright โ€” JavaScript-Rendered Pages

Best for: single-page apps (SPAs) and sites that render content with JavaScript. wget and curl only get the initial HTML โ€” if the content loads dynamically, you need a headless browser.

// save-pages.mjs โ€” Node.js + Playwright
import { chromium } from 'playwright';
import { writeFileSync, mkdirSync } from 'fs';

const urls = [
  'https://spa-docs.example.com/getting-started',
  'https://spa-docs.example.com/api-reference',
];

const browser = await chromium.launch();
const page = await browser.newPage();

for (const url of urls) {
  await page.goto(url, { waitUntil: 'networkidle' });
  const html = await page.content();
  const filename = url.split('/').pop() + '.html';
  mkdirSync('pages', { recursive: true });
  writeFileSync(`pages/${filename}`, html);
  console.log(`Saved: ${filename}`);
}

await browser.close();

Creating the ZIP Package

Once you have your HTML files downloaded, bundle them into a ZIP for the converter:

macOS / Linux

# From inside the downloaded folder:
cd community.denodo.com

# ZIP only HTML files, preserving directory structure
find . -name '*.html' -print | zip ../docs.zip -@

Or zip everything (non-HTML files are ignored by the converter):

zip -r ../docs.zip .

Windows (PowerShell)

Compress-Archive -Path .\downloaded\* -DestinationPath docs.zip

Windows (File Explorer)

  1. Select the folder with your HTML files
  2. Right-click โ†’ Compress to ZIP file

Checking Your ZIP Before Upload

The converter accepts ZIPs up to 100 MB with up to 200 HTML files:

# Count HTML files
unzip -l docs.zip | grep -c '\.html$'

# Check total size
du -h docs.zip

If your archive exceeds the limits, split it by subdirectory and convert in batches.

Tips and Best Practices

Next Step

Once you have your ZIP file ready, head to the converter and drop it in. The conversion happens entirely in your browser โ€” your files are never uploaded to any server.