unpdf
A strong pick. 4th of 9 PDF libraries.
unpdf is a small, zero-dependency wrapper around a patched serverless build of Mozilla's PDF.js. It extracts text, images, links and metadata from PDFs, and renders pages, on Node, Bun, Deno, browsers and Cloudflare Workers. It is a strong, actively maintained choice for reading PDFs, especially in serverless and AI pipelines. It cannot create or edit PDFs.
Best for: Teams that need to pull text, images or metadata out of PDFs in serverless, edge or AI document pipelines, without native dependencies.
Scores
Overall7.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
For reading PDFs in serverless, edge or AI pipelines, it is clearly the best pick among the PDF.js wrappers. It is well maintained, has no dependencies and runs everywhere. It cannot create PDFs, its validation and direct adoption are thin compared with the peers, and v2 drops older Node versions. That keeps it a strong niche pick rather than the category default.
- github releasesLastYear: Steady releases; latest 2026-11-15
- github.com/unjs/unpdf: Extraction and rendering features over the PDF.js serverless build
- dev.to/chudi_nnorukam/serverless-pdf-processing-why-unpdf-beats-pdf-parse-2jji: Works where pdf-parse fails in serverless
- peers: PDF.js covers viewing; pdf-lib, PDFKit and pdfmake cover creation
GPT-6.2 Sol: 7.7, likely 6.5 to 8.7
unpdf is a strong pick for new projects that need a typed extraction API across Node, browsers, and workers. Its recent updates and fixes support that choice, with most production evidence coming from smaller projects. PDF.js is the stronger pick for a full browser viewer, and PDFKit is the better fit for generating documents.
- raw.githubusercontent.com/unjs/unpdf/v2.2.1/README.md: Documents typed extraction across runtimes and limits on rendering.
- github.com/unjs/unpdf/releases/tag/v2.2.1: Current stable patch improves text and link extraction on long documents.
- github.com/SVRN-Ventures/linkedin-parser-serverless: Independent downstream application uses unpdf for extraction.
- mozilla.github.io/pdf.js: Mozilla’s project includes a browser viewer.
- pdfkit.org: PDFKit provides dedicated PDF generation and layout APIs.
Needed by many4.4
How many developers need a tool for this job?
Claude Opus 5.5: 4.5, likely 3.5 to 6.0
Pulling text and data out of PDFs is a common need, and it is growing with AI document workflows. Still, it is only the reading half of the category's job. Creating PDFs, which many apps need, is out of scope. That makes it a clear but sizable niche within PDF libraries.
- github description: PDF extraction and rendering across all JavaScript runtimes; no PDF creation
- pkgpulse.com/guides/unpdf-vs-pdf-parse-vs-pdfjs-dist-pdf-2026: Positioned for text and metadata extraction, not authoring
GPT-6.2 Sol: 4.3, likely 3.1 to 5.6
Document ingestion, search, and previews give PDF extraction a clear audience across several JavaScript runtimes. unpdf covers reading and raster previews, while PDF creation and interactive viewing fall outside its scope. The developer survey offers no direct measure of how many teams need this workflow.
- raw.githubusercontent.com/unjs/unpdf/v2.2.1/README.md: Extraction, raster rendering, and runtime support in the stable release.
- 2025.stateofjs.com/en-US/libraries: Survey provides no unpdf-specific usage estimate.
Helps a lot7.5
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Because it is built on PDF.js, text extraction quality matches the reference engine. It adds a clean, typed API for text, positioned text, images, links, metadata, scanned-page detection and page rendering. Its limits: no OCR, no form or annotation editing, password handling only through the lower-level path, and main-thread parsing in serverless. A user report praises its reliability on Vercel compared with pdf-parse.
- github.com/unjs/unpdf: Bundles PDF.js 6.x with an inlined worker, JBIG2/JPEG 2000 decoders, and image and render APIs
- dev.to/chudi_nnorukam/serverless-pdf-processing-why-unpdf-beats-pdf-parse-2jji: User report: replaced pdf-parse in 10 minutes; caveats on memory, destroy() and scanned PDFs
- pkgpulse.com/guides/unpdf-vs-pdf-parse-vs-pdfjs-dist-pdf-2026: No annotations; extractText takes no password
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 8.0, likely 6.8 to 9.0
Version 2.2.1 combines a small typed API for text, images, and metadata with direct access to PDF.js. The release processes text and links one page at a time, lowering peak memory in the project’s synthetic test. An independent comparison shows that loading the full file into memory still matters for large PDFs, and structured tables and OCR require extra work. Comparative testing of the current release across real documents and runtimes is limited.
- raw.githubusercontent.com/unjs/unpdf/v2.2.1/README.md: Documents typed extraction, rendering, scan inspection, and runtime caveats.
- github.com/unjs/unpdf/pull/76: Sequential extraction reduced peak memory on a synthetic 3,000-page PDF.
- github.com/earonesty/streaming-pdf-reader#memory-comparison: An alternative’s benchmark measures full-buffer unpdf against a reader using random access.
- github.com/library-evaluation-hub/eval-pdf-extract/blob/main/adapters/nodejs-unpdf/README.md: Independent evaluation adapter documents the lack of native table extraction in v1.6.2.
Holds up over time7.2
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 5.5 to 8.0
Maintenance is active: 106 commits and 15 releases in the past year, a release six days ago, and zero open issues or pull requests. It lives under the unjs organization, but the work rests mostly on one maintainer, Johann Schopplich, with 21 contributors in total. The v2 switch to ESM-only and Node 24+ was a real breaking change. It also has to keep tracking PDF.js upstream.
- github commitsLastYear / releasesLastYear: 106 commits, 15 releases
- github openIssues / openPullRequests: 0 open issues, 0 open PRs
- github.com/fluxmailai/fluxmail/pull/330: v2 is ESM-only and requires Node.js 24
- github contributors: 21 contributors
GPT-6.2 Sol: 7.3, likely 6.1 to 8.5
The repository recorded 106 commits and 15 releases in a year, and a contributor’s memory improvement shipped three days after submission. Version 2 moved to ESM and Node.js 24 and changed several return values, creating real upgrade work. npm lists one collaborator, so release coverage remains uncertain despite contributions from several developers.
- github commitsLastYear, releasesLastYear, contributors, openIssues and openPullRequests: 106 commits, 15 releases, 21 contributors, and no open issues or pull requests at collection.
- github.com/unjs/unpdf/pull/76: Contributor patch opened November 12 and merged November 15.
- github.com/unjs/unpdf/releases/tag/v2.0.0: Documents the Node.js 24 minimum, ESM transition, and changed API results.
- npmjs.com/package/unpdf?activeTab=dependencies: Registry snapshot lists one npm collaborator.
Used widely5.6
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
Downloads went from about 0.47M to 45M per 4 weeks, a ratio near 95 against a median of 4.1. That is a huge relative gain. But such a jump, with only one dependent package counted by ecosyste.ms and 1.3k stars, suggests that much of it comes from a popular tool that installs it rather than from direct choice. Many Renovate and Dependabot pull requests in small apps show real direct use, likely in the thousands to tens of thousands of projects.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 45.2M vs 0.47M a year ago, far above the 4.1 median ratio
- dependents: 0 repos, 1 package counted; peers have thousands
- github stars: 1,279 stars, far below peers
- github.com/owine/house-manager/pull/689: Example of direct adoption in app repos via Renovate
GPT-6.2 Sol: 5.1, likely 3.4 to 7.0
Four-week downloads rose from about 475,000 to 45.2 million, roughly 95 times the prior year and well above the 4.1 times catalog baseline. That is the fastest download growth in this peer group, though automated and transitive installs can amplify it. Stars and tracked dependent repositories trail PDF.js and PDFKit, while a separate npm snapshot lists hundreds of dependents where ecosyste.ms found one package. The gap between these signals leaves the number of projects choosing unpdf directly uncertain.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo and medianDownloadsRatio: 45.2 million versus 475,000 downloads, against a 4.1 times baseline.
- github stars, dependents, bluesky posts and peers: 1,279 stars, zero indexed repositories, one indexed package, and zero Bluesky posts.
- javascripts.com/packages/unpdf: September 2026 snapshot lists 397 npm dependents.
Vouched for4.4
Who stands behind it being good?
Claude Opus 5.5: 4.0, likely 2.5 to 5.5
Independent support comes from a few blog guides and one practitioner write-up that recommend it for serverless extraction. It is not in developer surveys, and Hacker News and Bluesky attention is minimal. Membership in unjs and its PDF.js base give some indirect trust. No well-known production user is documented.
- pkgpulse.com/guides/unpdf-vs-pdf-parse-vs-pdfjs-dist-pdf-2026: Third-party guide recommends it for edge extraction
- dev.to/chudi_nnorukam/serverless-pdf-processing-why-unpdf-beats-pdf-parse-2jji: Practitioner write-up on production use on Vercel
- hackerNews / bluesky: 1 HN story with 2 points; 0 Bluesky posts
GPT-6.2 Sol: 4.8, likely 3.3 to 6.4
Independent projects use unpdf in a serverless LinkedIn PDF parser and a community n8n node. A Bun project documented why it chose unpdf after comparing several alternatives, and an edge developer reported memory limits on large PDFs. These are concrete reports from smaller projects, with limited evidence from large production deployments or developer satisfaction surveys.
- github.com/SVRN-Ventures/linkedin-parser-serverless: Uses unpdf for extraction and measures performance on LinkedIn exports.
- github.com/annhdev/n8n-nodes-pdf-extractor: Community n8n node builds its PDF extraction on unpdf.
- github.com/fx/ob/blob/main/docs/changes/0013-pdf-text-extraction.md: Documents choosing unpdf over several alternatives for Bun.
- reddit.com/r/webdev/comments/1w162r2/oss_convert_pdf_to_html_with_100_visual_parity: Developer reports high memory use in edge functions.
- 2025.stateofjs.com/en-US/libraries: No unpdf satisfaction or retention result.
Safe7.7
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 6.5 to 9.0
It has zero dependencies, no recorded advisories and an MIT licence. Its main risk is inherited: it bundles a patched PDF.js that parses untrusted files. PDF.js has had serious flaws, such as CVE-2024-4367, so safety depends on fast rebundling. There is no OpenSSF Scorecard, and releases appear to depend on a single maintainer.
- npm dependencies: 0 dependencies
- advisories total: No known advisories
- scorecard: No OpenSSF Scorecard data
- CVE-2024-4367 (PDF.js): Bundled PDF.js inherits upstream parser vulnerabilities
GPT-6.2 Sol: 7.3, likely 5.9 to 8.6
unpdf is MIT licensed, has zero required npm dependencies, and has no direct OSV advisories in the bundle. The current bundled PDF.js includes the fix for a July 2026 high-severity upstream advisory, and unpdf’s October upgrade moved it beyond the affected version range. Releases use a GitHub Actions workflow with npm trusted publishing. Applications still need to enforce resource limits for uploaded PDFs, and the missing OpenSSF Scorecard leaves some repository controls unverified.
- npm license, npm dependencies, advisories and scorecard: MIT, zero required dependencies, zero direct OSV advisories, and no Scorecard result.
- github.com/advisories/GHSA-hq66-cqwq-w95j: High-severity upstream advisory fixed in PDF.js 6.2.108.
- github.com/unjs/unpdf/releases/tag/v1.9.0: October release moved the bundled engine to PDF.js 6.4.
- raw.githubusercontent.com/unjs/unpdf/v2.2.1/.github/workflows/release.yml: Tagged releases publish from GitHub Actions using an OIDC identity.
- raw.githubusercontent.com/unjs/unpdf/v2.2.1/README.md: Confirms PDF.js 6.5.438 and documents caller-managed resource limits.
Good
- It has no runtime dependencies and bundles a PDF.js build with the worker inlined, so it runs on Cloudflare Workers and Vercel without canvas build failures.
- Its high-level API (extractText, extractImages, extractLinks, getMeta, renderPageAsImage) is much shorter than raw pdfjs-dist code.
- It is actively maintained: 15 releases and 106 commits in the last year, with no open issues or pull requests.
- It is the modern replacement for the unmaintained pdf-parse, and it lets you swap in the official pdfjs-dist build when needed.
Bad
- It only reads and renders PDFs. To create or edit them you need pdf-lib, PDFKit, pdfmake or jsPDF.
- v2 is ESM-only and requires Node.js 24+, and the bundle needs Safari 18.4+. This breaks older setups.
- The serverless build parses on the main event loop with no worker, so large or malformed PDFs can block a request unless you add timeouts.
- It has no OCR, so scanned PDFs return empty text, and its security depends on how quickly it picks up PDF.js fixes.
The numbers
- npm downloads, 4 weeks
- 45M ×95 in a year
- GitHub stars
- 1.3k
- Commits, 12 months
- 106
- npm version
- 2.2.1 Nov 2026
- Versions, 12 months
- 15
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (unjs/unpdf), npm (unpdf), OSV and the OpenSSF Scorecard.
PDF libraries
- 8.7PDF.js
- 7.6PDFKit
- 7.4React-PDF viewer
- 7.4unpdf
- 7.3React-pdf renderer
- 7.2pdfmake
- 6.9pdfme
- 6.4jsPDF
- 4.9pdf-lib