pdf-inspector vs Marker: The Fastest PDF Parser Against the Most Accurate OCR
pdf-inspector vs Marker: The Fastest PDF Parser Against the Most Accurate OCR
pdf-inspector and Marker both convert PDFs to Markdown, and both are open source — but they solve almost opposite problems. pdf-inspector, Firecrawl's 2026 Rust engine, is built to parse native-text PDFs as fast as physically possible: milliseconds per document, no GPU, runs in a browser. Marker is built to conquer the PDFs that text extraction cannot touch: scanned pages, complex academic layouts, image-heavy slides, using deep-learning OCR that ideally wants a GPU.
If you would rather not run either yourself, file2markdown combines both approaches — a pdf-inspector-powered fast path for text PDFs and automatic OCR for scans — in a free web converter and API.
The Quick Answer
Use pdf-inspector when your PDFs have a text layer (most business documents do). It is orders of magnitude faster, installs in seconds, and needs no GPU.
Use Marker when your PDFs are scanned, image-based, or so layout-heavy that only vision models can read them — and you have the hardware to run it.
The two are genuinely complementary: pdf-inspector's classifier tells you in ~10–50ms whether a document even needs OCR, which makes "pdf-inspector first, Marker (or another OCR) for the leftovers" a natural production architecture. That routing pattern is how Firecrawl uses it internally, and it mirrors how file2markdown works too.
What Each Tool Is
pdf-inspector (Firecrawl, MIT) parses PDF content streams natively in Rust. It classifies each document (text-based, scanned, mixed — with a confidence score and per-page routing hints), extracts position-aware text, and converts to Markdown with headings, lists, tables, and code blocks. Ships as an npm package, Python wheel, Rust crate, and browser WASM build.
Marker (datalab, 18k+ GitHub stars) runs a pipeline of deep-learning models — layout detection, OCR, table recognition — to reconstruct documents that plain text extraction cannot. Output quality on scanned academic papers and financial reports is the best in open source. It requires Python, several gigabytes of models, significant RAM, and realistically a GPU for throughput.
Head-to-Head Comparison
| pdf-inspector | Marker | |
|---|---|---|
| Native-text PDFs | Milliseconds | Seconds+ (model overhead) |
| Scanned PDFs | Classify-only, no OCR | Excellent (deep-learning OCR) |
| Complex layouts | Can scramble multi-column order | Best-in-class reconstruction |
| Hardware | Any (runs in a browser tab) | 8GB+ RAM, GPU recommended |
| Install | Single package, seconds | Python + model downloads, 15–30 min |
| Languages | Rust, Python, Node.js, WASM | Python |
| License | MIT | GPL-based (check terms for commercial use) |
Speed vs Coverage, Measured
Roughly half of real-world PDFs are pure native text — no OCR needed. On those, running Marker's vision pipeline is pure overhead: in our tests pdf-inspector converted a 200-page text PDF in under 200ms with headings and tables intact, a workload where model-based pipelines take minutes without a GPU.
But the other half is where pdf-inspector simply stops. A scanned contract returns a classification ("scanned, route to OCR") and no Markdown. Marker reads it. If your corpus is archives, paper scans, or old filings, Marker-class OCR is not optional.
Installing and Using Each
pdf-inspector
npm install @firecrawl/pdf-inspector
import { processPdf } from '@firecrawl/pdf-inspector';
const result = processPdf(buffer);
if (result.pdfType === 'Scanned') {
// route to your OCR service
} else {
console.log(result.markdown);
}
Marker
pip install marker-pdf
marker_single report.pdf --output_dir ./out
Which Should You Use?
- Business documents, contracts, reports, invoices (text layer present) → pdf-inspector. Faster by orders of magnitude, trivial to deploy.
- Scanned archives, image-based PDFs, complex academic papers → Marker. See Marker vs MarkItDown and Marker vs Docling for how it compares to other heavyweights.
- A mixed corpus → route with pdf-inspector's classifier: fast path for text, OCR for scans. Our scanned PDF guide walks through the pattern.
- No infrastructure at all → file2markdown implements exactly this hybrid: pdf-inspector speed on text PDFs, automatic OCR on scans, plus DOCX, PPTX, XLSX and more — free in the browser, no signup.
For the complete rankings, see the best PDF to Markdown converters in 2026.
The Markdown Memo
A fortnightly note for lawyers, researchers, accountants, and anyone else drowning in PDFs, scans, and decks. No spam.