Firecrawl PDF Inspector - Firecrawl's Open-Source PDF Parsing Engine
Firecrawl PDF Inspector (repo name: pdf-inspector) is the high-performance PDF parsing engine open-sourced by Firecrawl: written in Rust, it classifies a PDF as text-based, scanned, image-based, or mixed in roughly 10–50ms, then converts text-based PDFs into clean, position-aware Markdown locally in under 200ms. Source at github.com/firecrawl/pdf-inspector, MIT licensed — and this site (pdf-inspector.wiki) is its official hub.
How does it relate to Firecrawl?
pdf-inspector is not a spin-off that merely comes "from Firecrawl" — it is the underlying engine of Firecrawl's official PDF pipeline:
| Layer | What it is | Where |
|---|---|---|
| pdf-inspector | The open-source PDF classification & parsing engine (this page's subject) | github.com/firecrawl/pdf-inspector, fully local |
| Firecrawl Parse | The hosted parsing API — OCR and scale included, zero ops | firecrawl.dev/parse |
| AnyDoc | Sister open-source project: 14 office formats to Markdown, PDF path powered by pdf-inspector | github.com/firecrawl/anydoc · anydoc.wiki |
All three shipped together — see Firecrawl's announcement. The @firecrawl scope on npm (@firecrawl/pdf-inspector, @firecrawl/pdf-inspector-wasm, @firecrawl/anydoc) belongs to this same product line.
In one sentence: self-hosted with fine-grained control → open-source pdf-inspector; hosted, OCR, at scale → Firecrawl Parse; mixed office documents → AnyDoc.
Why did Firecrawl build it?
OCR is slow and expensive — but while processing web-scale documents, Firecrawl found that ~54% of PDFs don't need OCR at all: the text is right there in the content stream, and direct extraction is faster, more accurate, and free. pdf-inspector's design philosophy is "classify first, then extract":
- Classify: sample-render page pixels, decide
TextBased/Scanned/ImageBased/Mixedin milliseconds, with confidence and per-page OCR routing; - Extract: text-based files convert locally — multi-column reconstruction, table recognition, and CID font decoding in one pass;
- Route: only pages that genuinely need OCR go to OCR, so you spend where it counts.
Core capabilities at a glance
- Millisecond classification: four document types in 10–50ms + 0–1 confidence + per-page routing signals;
- Region-aware extraction: every text span carries X/Y coordinates, font, and size; extract by bounding box;
- Layout reconstruction: newspaper-style multi-column reading order, correct RTL handling;
- Table structure: ruled-line detection + alignment heuristics, cross-page tables stitched;
- Semantic Markdown: font-size-based heading levels, lists, links, code blocks — token-friendly GFM output.
On the official opendataloader-bench (200 real PDFs) it scores 0.875 overall — #1 — and runs the full corpus in 0.470s, also the fastest; full numbers on the benchmark page.
Getting started
| Scenario | Fastest path |
|---|---|
| Try it online first | Homepage demo: drop a PDF, parsed locally, free & unlimited |
| CLI for batch jobs | cargo install pdf-inspector, then pdf2md file.pdf — see the install page |
| Code integration | Node.js / Python / Rust / browser WASM — see the guide |
| Source & issues | The GitHub repository guide |
const { processPdf } = require('@firecrawl/pdf-inspector')
const result = await processPdf('report.pdf')
console.log(result.pdfType) // "TextBased"
console.log(result.markdown) // clean GFM Markdownfrom pdf_inspector import process_pdf
result = process_pdf("report.pdf")
print(result.pdf_type) # "text_based"
print(result.markdown)detect-pdf report.pdf # classification only
pdf2md report.pdf -o report.md # convert to MarkdownFAQ
Is Firecrawl PDF Inspector free?
The open-source version is entirely free — MIT licensed, no usage caps, commercial use fine. The online demo on this site is free too, with no uploads. Firecrawl's hosted Parse API is a paid cloud service billed by usage, for teams that don't want to self-operate.
Is this the same as Firecrawl's web crawler?
No. Firecrawl's main product is a web scraping & parsing platform; pdf-inspector is the PDF engine they open-sourced, usable fully standalone — install it locally and feed it PDF files, no crawler involved.
Does it handle scanned or Chinese PDFs?
Scanned files are covered by optional selective OCR (only pages rejected by quality checks go to OCR). Chinese and other CJK text works fine — CID/Type0 fonts decode via ToUnicode CMaps, and the WASM build embeds CJK CMaps. Start by checking which type your file is with the online detector.
What about AnyDoc?
A sister project. AnyDoc converts 14 office formats — Word, PPT, Excel, and more — to Markdown, and its PDF path calls pdf-inspector. PDF-only work is lighter with pdf-inspector; mixed formats belong to AnyDoc. See the AnyDoc page.