HTML to Markdown
Turn saved web pages, PDFs and Office files into Markdown you can paste into ChatGPT, Claude or any other LLM. Drop single files, a whole folder or a ZIP archive.
100% local. Your files never leave your device. Conversion and OCR run in your browser with WebAssembly.
Starting the converter…
What it converts
HTML files go through a small converter written in Rust and compiled to WebAssembly (about 50 KB). It takes the <main> or <article> part of a page if there is one, drops navigation, headers, footers, sidebars, forms and scripts, and writes headings, lists, tables, links and code blocks as GitHub-Flavored Markdown. Files without an extension, as wget sometimes saves them, are accepted when they look like HTML.
Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF files go through anydoc, a document converter by Firecrawl, also compiled to WebAssembly. It is about 5 MB and only loads when you drop the first document.
Scanned PDF pages have no text layer. The converter renders those pages with pdf.js and reads them with PaddleOCR models in onnxruntime-web. Models and runtime are about 26 MB and only load when a PDF needs OCR. The recognition model covers Latin script, including umlauts, ß and €. OCR text can contain errors, so the result tells you which pages were read this way.
Every file becomes a .md file. You can copy one file, copy all of them at once or download everything as a ZIP. The token count above the results is an estimate at four characters per token.
Single files and ZIP archives can be up to 1 GB. Above 100 MB the converter warns you: the page stays usable, but the conversion can take minutes and the tab may run out of memory.
How to save a website's HTML
For a few pages, open each one in your browser, press Ctrl+S (⌘+S on a Mac) and pick "Web Page, HTML Only". You don't need the images or the CSS.
A whole documentation site with wget
wget mirrors a section of a site with one command:
wget -r -np -k -E \
-w 0.5 --random-wait \
https://docs.example.com/en/latest/-rfollows links-npnever goes above the start path-krewrites links so they point to the local files-Eadds.htmlto URLs without an extension-w 0.5 --random-waitwaits about half a second between requests
With -l 2 wget stops two levels below the start page. To skip images, fonts and scripts, add a reject pattern:
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://docs.example.com/en/latest/Install wget with brew install wget on macOS, sudo apt install wget on Ubuntu or Debian and winget install JernejSimoncic.wget on Windows.
Pages built with JavaScript
wget and curl only get the HTML the server sends. If a site builds its content in the browser, save the page from the browser once it has loaded, or script a headless browser such as Playwright and save page.content().
Folder or ZIP
You can drop the downloaded folder as it is. The converter goes through all subfolders. Files it can't read, like CSS, scripts and images, are listed as unsupported and left out. If you prefer a single file, zip the HTML files:
cd docs.example.com
find . -name '*.html' -print | zip ../docs.zip -@On Windows, PowerShell does the same:
Compress-Archive -Path .\docs.example.com\* -DestinationPath docs.zipBefore you crawl a site, check its robots.txt and terms of use. wget follows robots.txt by default. Keep the delay between requests so you don't put load on the server.
Everything runs in your browser
The page loads the converters from this site and runs them in your browser. Your browser reads the files, converts them in a Web Worker and sends them nowhere. The WASM files, OCR models and runtimes come from this domain, not from a CDN.
You can check this in the network tab of your browser's developer tools: every request made while converting goes to this domain.
The converter is built from open-source components. Their licenses are in third-party-licenses.txt.