Free tool · runs in your browser
PDF to Markdown converter
Convert the first 3 pages of a PDF to clean Markdown for ChatGPT, Claude or a RAG pipeline, free and without uploading it. The conversion runs in your browser with pdf.js: headings are detected from font sizes, lists are kept, and running headers, footers and page numbers are removed. Nothing leaves your device.
Converter
Or drag a PDF onto this box. Only the first 3 pages are converted. The file stays on this device.
Loading the converter…
How it works
- pdf.js (Apache-2.0, served from this site) reads the text layer of each page in a Web Worker.
- Text pieces are grouped into lines by position. The most common font size is body text; lines 15%, 35% and 70% larger become
###,##and#headings. - Lines are joined into paragraphs unless there is a vertical gap, hyphenated words are rejoined, and bullets become Markdown list items.
- Lines repeated at the top or bottom of several pages (running headers and footers) and bare page numbers are removed.
Limits: no tables, no OCR, no images, first 3 pages. The Document to Markdown actor does all of those, plus DOCX, PPTX, XLSX and HTML, and returns RAG chunks with page and heading metadata. Compare other options in Best PDF to Markdown converters for RAG.
Example
A page with a large title, a section heading and a bulleted list comes out like this:
# Attention Is All You Need
## 1 Introduction
Recurrent neural networks, long short-term memory and gated recurrent neural networks in particular, have been firmly established as state of the art approaches…
- Scaled dot-product attention
- Multi-head attention
Frequently asked questions
Is my PDF uploaded anywhere?
No. The page uses pdf.js, bundled on this site, to read the file inside your browser. There is no server-side code and no analytics; you can disconnect from the internet after the page loads and it still works.
Why only the first 3 pages?
It is a free sample of the conversion. For whole documents, many files, scanned pages or an API, use the Document to Markdown actor on Apify ($0.30 per 1,000 digital pages).
How are headings detected?
From font size: the most common size is treated as body text, and larger lines become #, ## or ###. Bullets and numbered lists are kept, hyphenated line breaks are joined, and running headers, footers and page numbers are removed.
Does it convert tables?
Not in this free tool: table cells come out as lines of text. The actor turns ruled PDF tables into Markdown tables.
Can it read scanned PDFs?
No. Scanned pages have no text layer, so they need OCR. The tool tells you when that is the case; the actor OCRs only the pages that need it, in 25 languages.
Why Markdown for ChatGPT, Claude or RAG?
Markdown keeps headings, lists and structure in very few extra tokens. Headings give natural chunk boundaries for retrieval, and models read structured Markdown more reliably than flattened text.
Third-party code: pdf.js 6.4.299, Apache License 2.0, Mozilla Foundation.
Last updated 8 November 2026. Questions or corrections: benjamin@benjaminbritton.co.uk.