Docs sites are content wrapped in chrome: a sidebar tree, a top navbar, an "Edit on GitHub" button, a search box, a footer with links. The valuable bit is the prose in the middle. Our converter discards the furniture and emits just the article — same as if the maintainer had written it as a Markdown file in the first place.
Why docs sites don't convert cleanly with generic scrapers
A naïve HTML-to-Markdown pass on a ReadTheDocs page produces a 4,000-line file: half of it is the navigation tree expanded inline, a quarter is footer links, and somewhere in there is the actual content. Worse, the same nav tree gets duplicated on every page you scrape, so an archive of 200 pages is mostly identical chrome. Our converter detects the main content region using semantic markers (<main>, <article>, role="main") and template-aware heuristics for the major frameworks, then emits the article body only.
Framework-aware extraction
We recognise the common docs frameworks — Sphinx/ReadTheDocs, Docusaurus, MkDocs (Material), GitBook, Mintlify, Nextra, VitePress, Bookdown — and apply per-framework selectors so extraction is reliable. Code blocks keep their language hint (```python), admonitions ("Note", "Warning") become Markdown blockquotes with the label preserved, and internal cross-links are rewritten to relative .md paths so the archive is browsable offline.
Before / After
Before (PDF):
[Docs page HTML]
<nav>… 200 sidebar links …</nav>
<header>… search box, version picker …</header>
<main>
<h1>Authentication</h1>
<p>Use a Bearer token in the Authorization header.</p>
<pre><code class="language-bash">curl -H "Authorization: Bearer $TOKEN" …</code></pre>
</main>
<footer>… 50 footer links …</footer>
After (Markdown):
# Authentication
Use a Bearer token in the Authorization header.
```bash
curl -H "Authorization: Bearer $TOKEN" …
```
Frequently asked questions
Does this work on ReadTheDocs and Sphinx-built sites?
Yes — Sphinx/RTD is one of the most common targets. The default Sphinx theme and the RTD theme both expose a clear div.document / main region that the converter extracts. Furo, Alabaster, and most community themes follow the same convention. For exotic themes that bury content in deeply-nested divs, a self-hosted script using BeautifulSoup with a custom CSS selector (e.g. soup.select_one("div.documentwrapper")) plus html2text gives you full control.
How do code blocks survive the conversion?
Code blocks keep their language hint via the class="language-python" or data-language attribute that every modern docs theme adds. The result is a fenced Markdown block (```python) that renders with syntax highlighting in any viewer. Inline <code> stays as backticks.
Can I crawl an entire documentation site, not just one page?
MDisBetter's web tool converts one URL at a time. For full-site crawls, the OSS path is short: pip-install Trafilatura, run trafilatura --sitemap https://docs.example.com/sitemap.xml --output-dir ./docs --output-format markdown, and you get one .md per page mirroring the URL structure. JS-rendered docs sites that defeat Trafilatura can be paged through the MDisBetter web tool one URL at a time, or rolled into a Playwright-based crawler.
Are admonitions (Note, Warning, Tip) preserved?
Yes — Sphinx .. note:: blocks, Docusaurus :::note blocks, and Material for MkDocs admonitions all become Markdown blockquotes with the label kept as bold prefix (> **Note:** …). Renders correctly in every Markdown viewer; round-trips back to the original syntax with a small post-processor if you need it.
What about versioned docs (v1, v2, latest)?
Each version lives at its own URL — we convert whichever URL you submit. For multi-version archives, fetch each version's sitemap separately and store under a version-prefixed folder. The converter doesn't silently merge versions.
Your AI doesn't read PDFs directly. It first has to extract the text, decode the layout, ignore the metadata — before it can even start answering. A Markdown file removes all of those steps. Your AI reads it instantly. So you get faster responses, more accurate results, and zero information lost along the way.
Size-wise, it's 100 to 500 times lighter for the same content. A 15 MB PDF becomes a 30 KB .md file. So your AI knowledge base can hold hundreds of documents instead of a handful.
MDisBetter brings 19 free tools together for that — documents, videos, audio, web pages and prompts.
How does it work?
Drop a PDF, a video, an audio file or a URL. MDisBetter extracts the content and gives you a clean Markdown file. So you can send it to your AI, add it to your project files, or store it in your knowledge base — without losing anything.
Frequently Asked Questions
How do I convert a PDF to Markdown for free?
Upload your PDF to MDisBetter, click Convert, and get structured Markdown in seconds. No signup, no installation — it works directly in your browser. The free plan includes 50 credits per month.
Why is Markdown better than PDF for AI?
Markdown reduces token usage by up to 95% compared to PDF. AI models like ChatGPT and Claude process Markdown far more efficiently because it contains only content structure — no fonts, no layout data, no binary overhead.
What file types can MDisBetter convert?
MDisBetter converts PDF, Word (.docx), plain text, YouTube videos (transcript), audio files (MP3, WAV, M4A, OGG, FLAC, WEBM), and any web page URL to clean Markdown.
Is MDisBetter free?
Yes, free to start. The free plan includes 50 credits per month. All processing happens securely — your files are never stored.
Can I extract a YouTube transcript as Markdown?
Yes. Paste the YouTube video URL, click Convert, and get the full transcript structured as Markdown with headings and timestamps. Perfect for feeding video content to AI tools.
PDF → Markdown
Faithful and structured conversion of your documents
Text to MD, EPUB to MD, MD to PDF, MD Cleaner, Merger, Chunker, Token Counter, Context Builder
Free
—
Word to MD
0.5 credit
per page
Excel to MD
0.5 credit
per conversion
Single URL Scrape
0.5 credit
per call
Site Crawl
1 credit
per page
Translate
1 credit
per 10 000 chars (min 1, free re-translation on cache hit)
Prompt Optimizer
1 credit
per call
System Prompt Generator
1 credit
per call
Audio to MD
2 credits
per minute
Video to MD
2 credits
per minute
YouTube to MD
2 credits
per minute
Image OCR
4 credits
per image (0 on cache hit)
PDF to MD
4 credits
per page
PPTX to MD
4 credits
per slide
Questions
Yes! You get 50 credits every month to use any tool. Basic tools like MD Cleaner or Token Counter cost just 0.5 credit per use. When you run out, credits reset the next month or you can upgrade for more.
Wait for your monthly reset or upgrade to a higher plan. Credits renew on your billing date each month.
Yes, cancel anytime with one click. No questions asked. You keep access until the end of your billing period.
Pro gives you 30,000 credits for $29 — that's 30x more credits than Starter for just 3x the price. Every credit costs less, so you get far more value per dollar.