Mozilla PDF.js
mozilla.github.io
- Free plan
- Linux
- Web
- Browser extension
- API
- Self-hosted
What Mozilla PDF.js is
Mozilla PDF.js is a free platform for parsing and rendering PDF files, built around web standards. Developers can use its display API to render documents and retrieve document information, or adapt its viewer layer to create a custom interface. The viewer is used in Firefox and project browser extensions, and PDF.js is built into Firefox 19 and later; the project also provides a Chromium extension. It can display annotations and add a subset of annotation types, and supports form filling, but does not provide OCR. Prebuilt builds are available, as are hosted versions through jsDelivr, cdnjs, and unpkg. The project aims to support HTML5-compliant browsers and offers a legacy build, though PDF feature support differs by browser and version. Local builds are documented, but some browsers require a web server rather than opening PDFs through file URLs. Cross-origin requests are blocked by default; the FAQ points to CORS or a server proxy as possible approaches. For large documents, rendering only visible pages can reduce memory use. PDF.js uses the Apache 2.0 license, and its documentation uses CC BY-SA 2.5.
Who it suits
PDF.js is aimed at developers who want to embed PDF rendering, build a custom viewer, or contribute to a community-driven project.
Good to know, and what to watch
- Free, open-source PDF parsing and rendering.
- Display API retrieves document information.
- Viewer layer can be adapted for custom interfaces.
- Supports form filling and a subset of annotations.
- Prebuilt builds and CDN-hosted versions are available.
- OCR support is not provided.
- Cross-origin requests are blocked by default.
- PDF feature support varies by browser and version.
- Local use may require a web server.
Plans
Every plan and pricePDF.js
Free plan
The verdict
PDF.js offers a flexible foundation for PDF viewing and integration, with an API and adaptable viewer. Developers should account for browser differences, cross-origin limits, and the absence of OCR.
What the maker publishes
- Annotations
- PDF.js renders annotations for viewing and supports adding a subset of annotation types. source
- Annotation tools
- Yes source
- API
- The display layer exposes an API for rendering PDFs and retrieving document information. source
- Browser support
- The project aims to support HTML5-compliant browsers and provides a legacy build for older browsers; PDF feature support varies by browser and version. source
- Cross-origin constraint
- PDF.js cannot make cross-origin requests by default; the FAQ describes CORS or a server proxy as possible approaches. source
- Distribution
- Prebuilt builds are available, and the project lists jsDelivr, cdnjs, and unpkg as CDNs hosting PDF.js. source
- Form filling
- Yes source
- Free plan
- Yes source
- Integrations
- PDF.js is built into Firefox 19 and later, and the project provides a Chromium browser extension. source
- Intended users
- The project describes itself as community-driven and invites contributors, while its library and viewer documentation gives developers ways to embed or build on PDF.js. source
- Large documents
- The FAQ recommends rendering only visible pages to reduce memory use when working with many high-resolution pages. source
- License
- PDF.js is licensed under Apache 2.0, and its documentation is licensed under CC BY-SA 2.5. source
- OCR support
- none source
- Platform support
- web source
- Purpose
- PDF.js is a web standards-based platform for parsing and rendering PDF files. source
- Security reporting
- The project directs reports about the library or Firefox PDF Viewer to Bugzilla and reports about the Chrome extension to GitHub’s private vulnerability reporting form. source
- Self hosting
- The project documents cloning and building PDF.js locally, and says a local web server is needed because some browsers disallow opening PDFs through file URLs. source
- Support
- The project points users to GitHub issues for technical problems and its Matrix room for questions or guidance. source
- Viewer
- Its viewer layer provides the user interface used in Firefox and project browser extensions, and can be adapted to build a custom viewer. source
Checked against the maker's pages on 7 Oct 2026.