Skip to content

Best Open-Source PDF Tools: Free Self-Hosted Editors, OCR and Libraries

If you handle sensitive documents, an open-source PDF tool you run yourself keeps files off other people’s servers. This list covers eight maintained projects, from full PDF toolkits you open in the browser to command-line OCR and developer libraries. For each one we read the repository, licence and pricing page ourselves, so you can see who it suits, what it costs and how to install it before you spend an afternoon on it.

Quick answer

For an all-in-one PDF toolkit you host yourself, Stirling PDF (Docker or desktop app) and BentoPDF (runs entirely in the browser) are the main choices. For offline merge and split on a desktop, PDFsam Basic. To make scans searchable, OCRmyPDF; to archive and search all your paperwork, Paperless-ngx. Developers use PDF.js to show PDFs on websites, PyMuPDF in Python and qpdf on the command line.

Checked 18 October 2026

How to choose

Browser, desktop or server

BentoPDF processes files inside the browser, so even its hosted version does not upload them. Desktop apps such as PDFsam need nothing but an install. Stirling PDF and Paperless-ngx run as a server you or your IT person maintain, which suits teams sharing one install.

Read the licence before you build on it

AGPL projects (BentoPDF, PDFsam, PyMuPDF) are free to use, but if you modify them and offer them to others over a network you must publish your source, or buy the commercial licence their makers sell. Apache-2.0 (PDF.js, qpdf) and MIT code can go into closed-source products. Stirling PDF mixes MIT code with proprietary folders.

When a free online tool is simpler

If you only need to merge, split or protect a file now and then, installing a server is overkill. Our own PDF tools run in your browser without uploading the file, which covers the everyday jobs; self-hosting pays off when a team needs OCR, automation or an API.

The projects

Stirling PDF

Open-core

94,284 GitHub starslast code update 15 October 2026

A PDF platform with more than 50 tools to edit, merge, split, sign, redact, convert, OCR and compress PDFs without sending documents to outside services.

Who it suits
Individuals and teams who want a private PDF toolkit, and developers who need a PDF REST API.
How it is used
Run it as a desktop app, or as a self-hosted server you open in the browser; most tools are also available as REST APIs for automation.
Runs on
Docker or self-hosted server (browser), desktop app for Windows, macOS and Linux, Kubernetes
Licence
MIT for most code; some folders proprietary (open-core)
Free or paid
On 18 October 2026 the pricing page listed a free plan (self-hosted limited to 5 users), a Team plan at $99 a month for 100 users with SSO, and custom Enterprise pricing. Pricing page

How to set it up

  1. Install Docker.
  2. Start the container:
    docker run -p 8080:8080 docker.stirlingpdf.com/stirlingtools/stirling-pdf
  3. Open http://localhost:8080 in your browser.
  4. Or install the desktop app for Windows, macOS or Linux from the project docs.

Steps from the official docs

Good to know

  • Not all code is MIT: several folders carry proprietary licences (see the LICENSE file).
  • More than 5 users, SAML SSO and audit logs need a paid plan.

RepositoryWebsite

BentoPDF

Free

16,064 GitHub starslast code update 17 October 2026

A privacy-first PDF toolkit that merges, edits, converts and processes PDFs entirely inside your web browser, with no server-side processing.

Who it suits
People who want PDF tools without uploading files, and teams that want an internal PDF site.
How it is used
Open the web app and pick a tool; files are processed locally in the browser. Host it yourself with Docker or as static files on any web server.
Runs on
Browser; self-hosted with Docker or Podman, or as static files
Licence
AGPL-3.0 (commercial licence also sold)
Free or paid
Every tool is free under AGPL-3.0. A one-time commercial licence ($79 on 18 October 2026) is sold only for closed-source use without AGPL obligations. Pricing page

How to set it up

  1. Install Docker.
  2. Start the simple self-hosting image:
    docker run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
  3. Open http://localhost:3000 in your browser.
  4. Or download the release zip and serve it as static files on your web server.

Steps from the official docs

Good to know

  • By default some features load WASM modules (PyMuPDF, Ghostscript) from the jsDelivr CDN; offline installs need extra setup.

RepositoryWebsite

PDFsam Basic

Open-core

4,618 GitHub starslast code update 2 October 2026

A free desktop app to split, merge, extract pages from, rotate and mix PDF files.

Who it suits
Anyone who needs to split or merge PDFs offline on their own computer.
How it is used
Install it and work on PDFs locally; no internet connection or upload is needed.
Runs on
Windows, macOS, Linux (desktop)
Licence
AGPL-3.0
Free or paid
PDFsam Basic is free and open source. The same publisher sells separate paid apps, PDFsam Visual and PDFsam Enhanced, which are not open source. Pricing page

How to set it up

  1. Open the PDFsam Basic download page.
  2. Download the installer for your system: .exe for Windows, .dmg for macOS (ARM or Intel), .deb or portable .tar.gz for Linux.
  3. Install, launch and choose a tool such as Merge or Split.

Steps from the official docs

Good to know

  • The Windows downloader offers a trial of the paid PDFsam Enhanced; you can decline it.
  • Version 4 and later bundle their own Java runtime.

RepositoryWebsite

OCRmyPDF

Free

35,026 GitHub starslast code update 12 October 2026

A command-line tool that adds an OCR text layer to scanned PDFs so they can be searched and copied, producing PDF/A by default.

Who it suits
People and developers who need to turn scans into searchable PDFs, including in batches.
How it is used
Run it in a terminal (ocrmypdf input.pdf output.pdf) or from scripts; it also has a Python API.
Runs on
Linux, macOS, Windows, FreeBSD, Docker; command line and Python
Licence
MPL-2.0
Free or paid
Free and open source; no paid plan. Pricing page

How to set it up

  1. Install it with your package manager, for example on Debian or Ubuntu:
    apt install ocrmypdf
  2. On macOS use Homebrew:
    brew install ocrmypdf
  3. Install the Tesseract language packs you need (Arabic is "ara").
  4. Run it on a scanned file:
    ocrmypdf --output-type pdfa input.pdf output.pdf

Steps from the official docs

Good to know

  • Needs Ghostscript and Tesseract OCR installed as separate programs.
  • MPL-2.0 allows use in closed-source software, but changes to OCRmyPDF’s own files must be shared.

RepositoryWebsite

Paperless-ngx

Free

46,683 GitHub starslast code update 15 October 2026

A document management system that OCRs and indexes your scanned documents into a searchable archive.

Who it suits
Households and small offices that want to go paperless and keep bills, letters and records searchable on their own server.
How it is used
Use it in the browser: documents dropped into a folder, uploaded or pulled from email are OCR’d, tagged and made full-text searchable.
Runs on
Docker (recommended) or a Linux server; used in the browser
Licence
GPL-3.0
Free or paid
Free and community-supported; the project sells no plan. Pricing page

How to set it up

  1. Install Docker and Docker Compose.
  2. Run the official install script and answer its questions:
    bash -c "$(curl --location --silent --show-error https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
  3. The script pulls the images, starts the containers and creates your admin user.
  4. Open http://127.0.0.1:8000 and sign in.

Steps from the official docs

Good to know

  • The project warns that data is stored unencrypted, so never run it on an untrusted host; a home server with backups is recommended.
  • Reading Office files and emails needs the optional Apache Tika service.

RepositoryWebsite

PDF.js

Free

54,007 GitHub starslast code update 15 October 2026

A JavaScript library and viewer that parses and renders PDF files in web browsers. It is the built-in PDF viewer of Firefox.

Who it suits
Web developers who need to show PDFs inside a website or web app.
How it is used
Add the pdfjs-dist package from npm or a CDN to your web app, or adapt the included viewer.
Runs on
Web browsers (JavaScript library)
Licence
Apache-2.0
Free or paid
Free and open source, supported by Mozilla; no paid plan. Pricing page

How to set it up

  1. Install the prebuilt package in your project:
    npm install pdfjs-dist
  2. Or download the prebuilt stable release, which includes the viewer, from the Getting Started page.
  3. To work from source, clone the repo, run npm install, then npx gulp server and open http://localhost:8888/web/viewer.html.

Steps from the official docs

Good to know

  • It shows PDFs; it is not a PDF editor.
  • Mozilla asks that a viewer embedded on your site is re-skinned or built on, not shipped unmodified.

RepositoryWebsite

qpdf

Free

5,482 GitHub starslast code update 26 September 2026

A command-line tool and C++ library for content-preserving changes to PDF files, such as linearising, encrypting or decrypting, splitting and merging.

Who it suits
Developers and power users who script low-level PDF changes.
How it is used
Run qpdf commands in a terminal or script, or link the libqpdf library into your program.
Runs on
Linux, macOS, Windows (command line and C++ library)
Licence
Apache-2.0
Free or paid
Free and open source; no paid plan. Pricing page

How to set it up

  1. Download the binaries for your system from the GitHub releases page.
  2. On macOS, clear the quarantine flag in the unzipped folder, because the binaries are not notarized:
    xattr -r -d com.apple.quarantine bin lib
  3. To build from source you need a C++20 compiler, CMake 3.16+, zlib and libjpeg:
    cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build
  4. Check it works:
    qpdf --empty --pages a.pdf b.pdf -- merged.pdf

Steps from the official docs

Good to know

  • It does not display PDFs or extract text; it changes PDF structure.

RepositoryWebsite

PyMuPDF

Open-core

10,910 GitHub starslast code update 15 October 2026

A fast Python library, built on the MuPDF engine, for extracting, analysing, converting, rendering and editing PDFs and other documents.

Who it suits
Python developers building document processing, data extraction or AI pipelines.
How it is used
Install with pip and call it from Python code, for example to read the text of every page.
Runs on
Python library (Windows, macOS, Linux)
Licence
AGPL-3.0 (commercial licences from Artifex)
Free or paid
Free under AGPL-3.0. Artifex sells commercial licences for closed-source use, and the optional Office-formats add-on needs a licence key. Pricing page

How to set it up

  1. Install a supported Python 3 version.
  2. Install the library:
    pip install pymupdf
  3. Open a document and read its text:
    import pymupdf; doc = pymupdf.open('document.pdf'); print(doc[0].get_text())
  4. For OCR, install Tesseract separately.

Steps from the official docs

Good to know

  • Artifex states that using it in a server application or service under AGPL means disclosing your full source, unless you buy a commercial licence.

RepositoryWebsite

Common questions

What is the best free open-source PDF editor?

For a full toolkit, Stirling PDF has the most GitHub stars of the projects on this page (94,284 on 18 October 2026) and runs as a desktop app or a server; BentoPDF is the alternative that keeps every file inside your browser. Both cover merging, splitting, converting and signing.

Can I make a scanned PDF searchable for free?

Yes. OCRmyPDF adds a hidden text layer to scanned PDFs from the command line and supports Arabic through Tesseract’s "ara" language pack. Stirling PDF and Paperless-ngx also include OCR.

Is it safe to use open-source PDF tools for confidential files?

Running a tool yourself means files stay on your device or server, which is the main privacy benefit. Download only from the official repository or site listed here, keep the software updated, and note that Paperless-ngx stores data unencrypted, so its host must be trusted.

Can I use these PDF libraries in a commercial app?

PDF.js and qpdf use Apache-2.0, which allows commercial and closed-source use. PyMuPDF and BentoPDF are AGPL-3.0, so a closed-source or hosted product needs their commercial licence. Always read the LICENSE file of the version you ship.

How did you choose these PDF projects?

Each one is actively maintained (code pushed within the last year), has a clear licence and official install docs, and solves a real PDF job. We left out pdf-lib, a popular library, because it had no new code for over two years on 18 October 2026.

We are not affiliated with these projects. Facts were checked on the date above from each project's repository, licence and pricing page; prices, licences and install steps can change, so confirm on the official site before you rely on them. Arabic text is pending native review.