Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Latest commit

History

346 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

BentoPDF

BentoPDF is a powerful, privacy-first, client-side PDF toolkit that is self hostable and allows you to manipulate, edit, merge, and process PDF files directly in your browser. No server-side processing is required, ensuring your files remain secure and private.

Docker PullsKo-fiGitHub StarsSponsor me on GitHub

BentoPDF Tools


📢 Join Us on Discord

Discord

Have questions, feature requests, or want to chat with the community? Join our Discord server!


📚 Documentation

Documentation

Visit our Documentation for:

  • Getting Started guide
  • Tools Reference (50+ tools)
  • Self-Hosting guides (Docker, Vercel, Netlify, Cloudflare, AWS, Hostinger, Nginx, Apache)
  • Contributing guide
  • Commercial License details

📜 Licensing

BentoPDF is dual-licensed:

  • AGPL-3.0 for open-source projects where you share your full source code publicly
  • Commercial License for proprietary/closed-source applications - Get Lifetime License for $49 (a one-time lifetime purchase, includes all feature updates forever)

For more details, see our Licensing Page


⭐ Stargazers over time

Star History Chart


💖 Thank You to Our Sponsors

We're incredibly grateful to all our sponsors and supporters who help keep BentoPDF free and open source!

Sponsor me on GitHubBuy me a Coffee


✨ Why BentoPDF?

  • Privacy First: All processing happens in your browser. Your files are never uploaded to a server, guaranteeing 100% privacy.
  • No Limits: Manipulate as many files as you want, as often you want. There are no restrictions or upload limits.
  • High Performance: Built with modern web technologies, BentoPDF is fast and efficient, handling even large PDF files with ease.
  • Completely Free: BentoPDF is a free and open-source tool for everyone.

🛠️ Features / Tools Supported

BentoPDF offers a comprehensive suite of tools to handle all your PDF needs.

Organize & Manage PDFs

Tool NameDescription
Merge PDFsCombine multiple PDF files into one.
Split PDFsExtract specific pages or divide a document into smaller files.
Organize PagesReorder, duplicate, or delete pages with a simple drag-and-drop interface.
Extract PagesSave a specific range of pages as a new PDF.
Delete PagesRemove unwanted pages from your document.
Rotate PDFRotate individual or all pages in a document.
N-Up PDFCombine multiple pages onto a single page.
View PDFA powerful, integrated PDF viewer.
Alternate & Mix pagesMerge pages by alternating pages from each PDF.
Posterize PDFSplit a PDF into multiple smaller pages for print.
PDF Multi ToolMerge, Split, Organize, Delete, Rotate, Add Blank Pages, Extract and Duplicate in an unified interface.
Add AttachmentsEmbed one or more files into your PDF.
Extract AttachmentsExtract all embedded files from PDF(s) as a ZIP.
Edit AttachmentsView or remove attachments in your PDF.
Divide PagesDivide pages horizontally or vertically.
Combine to Single PageStitch all pages into one continuous scroll.
Add Blank PageInsert an empty page anywhere in your PDF.
Reverse PagesFlip the order of all pages in your document.
View MetadataInspect the hidden properties of your PDF.
PDFs to ZIPPackage multiple PDF files into a ZIP archive.
Compare PDFsCompare two PDFs side by side.

Edit & Modify PDFs

Tool NameDescription
PDF EditorA comprehensive editor to modify your PDFs.
Create Fillable FormsCreate professional fillable PDF forms with text fields, checkboxes, dropdowns, radio buttons, signatures, and more. Fully compliant with PDF standards for compatibility with all PDF viewers.
Add Page NumbersEasily add page numbers with customizable formatting.
Add WatermarkAdd text or image watermarks to protect your documents.
Header & FooterAdd customizable headers and footers.
Crop PDFCrop specific pages or the entire document.
Invert ColorsInvert the colors of your PDF pages for better readability.
Change BackgroundModify the background color of your PDF.
Change Text ColorChange the color of text content within the PDF.
Fill FormsFill out PDF forms directly in your browser.
Flatten PDFFlatten form fields and annotations into static content.
Remove AnnotationsRemove comments, highlights, and other annotations.
Remove Blank PagesAuto detect and remove blank pages in a PDF.
Edit BookmarksAdd, Edit, Create, Import and Export PDF Bookmarks.
Add StampsAdd image stamps to your PDF using the annotation toolbar.
Table of ContentsGenerate a table of contents page from PDF bookmarks.
Redact ContentPermanently remove sensitive content from your PDFs.

Convert to PDF

Tool NameDescription
Image to PDFConvert JPG, PNG, WebP, SVG, BMP, HEIC, and TIFF images to PDF.
JPG to PDFConvert JPG images to PDF.
PNG to PDFConvert PNG images to PDF.
WebP to PDFConvert WebP images to PDF.
SVG to PDFConvert SVG images to PDF.
BMP to PDFConvert BMP images to PDF.
HEIC to PDFConvert HEIC images to PDF.
TIFF to PDFConvert TIFF images to PDF.
Markdown to PDFConvert .md files into professional PDF documents.
Text to PDFConvert plain text files into a PDF.
EPUB to PDFConvert EPUB e-books to PDF format.
JSON to PDFConvert JSON to PDF.

Convert from PDF

Tool NameDescription
PDF to ImageConvert PDF pages to JPG, PNG, WebP, BMP, or TIFF formats.
PDF to JPGConvert each PDF page into a JPG image.
PDF to PNGConvert each PDF page into a PNG image.
PDF to WebPConvert each PDF page into a WebP image.
PDF to BMPConvert each PDF page into a BMP image.
PDF to TIFFConvert each PDF page into a TIFF image.
PDF to GreyscaleConvert a color PDF into a black-and-white version.
OCR PDFMake scanned PDFs searchable and copyable using Optical Character Recognition.
PDF to JSONConvert PDF files to JSON format.

Secure & Optimize PDFs

Tool NameDescription
Compress PDFReduce file size while maintaining quality.
Repair PDFAttempt to repair and recover data from a corrupted PDF.
Encrypt PDFAdd a password to protect your PDF from unauthorized access.
Decrypt PDFRemove password protection from a PDF (password required).
Change PermissionsSet or modify user permissions for printing, copying, and editing.
Sign PDFAdd your digital signature to a document.
Digital SignatureAdd cryptographic digital signatures using X.509 certificates (PFX/PEM).
Validate SignatureVerify digital signatures and view certificate details.
Redact ContentPermanently remove sensitive content from your PDFs.
Edit MetadataView and modify PDF metadata (author, title, keywords, etc.).
Remove MetadataStrip all metadata from your PDF for privacy.
Linearize PDFOptimize PDF for fast web view.
Sanitize PDFRemove potentially unwanted or malicous files from PDF.
Fix Page SizeStandardize all pages to a uniform size.
Page DimensionsAnalyze page size, orientation, and units.
Remove RestrictionsRemove password protection and security restrictions associated with digitally signed PDF files.

🌍 Translations

BentoPDF is available in multiple languages:

LanguageStatus
EnglishEnglish
GermanGerman
VietnameseVietnamese
ChineseChinese

Want to help translate BentoPDF into your language? Check out our Translation Guide!


🚀 Getting Started

You can run BentoPDF locally for development or personal use.

Prerequisites

🚀 Quick Start with Docker

Deploy on Zeabur

You can run BentoPDF directly from Docker Hub or GitHub Container Registry without cloning the repository:

You can also watch the video on how to set it up 👉 BentoPDF Docker Setup

Using Docker Hub:

docker run -p 3000:8080 bentopdf/bentopdf:latest

Using GitHub Container Registry:

docker run -p 3000:8080 ghcr.io/alam00000/bentopdf:latest

Open your browser at: http://localhost:3000

This is the fastest way to try BentoPDF without setting up a development environment.

Static Hosting using Netlify, Vercel, and GitHub Pages

It is very straightforward to host your own instance of BentoPDF using a static web page hosting service. Plus, services such as Netlify, Vercel, and GitHub Pages all offer a free tier for getting started. See Static Hosting) for details.

🏠 Self-Hosting Locally

Since BentoPDF is fully client-side, all processing happens in the user's browser and no server-side processing is required. This means you can host BentoPDF as simple static files on any web server or hosting platform.

Download from Releases (Recommended):

The easiest way to self-host is to download the pre-built distribution file from our GitHub releases. Each release includes a dist-{version}.zip file that contains all necessary files for self-hosting.

  1. Go to BentoPDF Releases
  2. Download the latest dist-{version}.zip file
  3. Extract the zip file
  4. Serve the extracted folder with your preferred web server

Serve the extracted folder (requires Node.js):

# Navigate to the extracted foldercd dist-1.7.3 # Replace with your version# Start a local server
npx http-server -c-1

The website will be accessible at: http://localhost:8080/

Note: The -c-1 flag disables caching for development.

Build from Source (Advanced):

If you prefer to build from source:

# Clone the repository
git clone https://github.com/alam00000/bentopdf.git
cd bentopdf
# Install dependencies
npm install
# Build the project
npm run build
# Package the distribution for hosting (optional)
npm run package
# Preview the build locally
npm run preview
# The website will be accessible at: http://localhost:4173/

Compression Modes:

BentoPDF supports different compression modes for optimized builds:

# Gzip only (smallest Docker image size)
npm run build:gzip
docker build --build-arg COMPRESSION_MODE=g -t bentopdf:gzip .# Brotli only (best compression ratio)
npm run build:brotli
docker build --build-arg COMPRESSION_MODE=b -t bentopdf:brotli .# No compression (fastest build time)
npm run build:original
docker build --build-arg COMPRESSION_MODE=o -t bentopdf:original .# All formats (default, maximum browser compatibility)
npm run build:all
docker build --build-arg COMPRESSION_MODE=all -t bentopdf:all .
ModeFiles KeptUse Case
g.gz onlyStandard nginx or minimal size
b.br onlyModern CDN with Brotli support
ooriginalsDevelopment or custom compression
allall formatsMaximum compatibility (default)

CDN Optimization:

BentoPDF can use jsDelivr CDN to serve large WASM files (LibreOffice, Ghostscript, PyMuPDF) for improved performance and reduced bandwidth costs:

# Production build with CDN (Recommended)
VITE_USE_CDN=true npm run build
# Standard build with local files only
npm run build

How it works:

  • When VITE_USE_CDN=true: Browser loads WASM files from jsDelivr CDN (fast, global delivery)
  • Local files are always included as automatic fallback
  • If CDN fails then it falls back to local files

Subdirectory Hosting:

BentoPDF can also be hosted from a subdirectory (e.g., example.com/tools/bentopdf/):

# Example:# 1. Build the app with the specific BASE_URL. BASE_URL must have a trailing and leading slash. The BASE_URL can be any url of your choice. Here we are using /tools/bentopdf/ as an example.
BASE_URL=/tools/bentopdf/ npm run build
# 2. Create the nested directory structure inside serve-test (or any folder of your choice for local testing. In case of production, create the nested directory structure inside the root directory)
mkdir -p serve-test/tools/bentopdf
# 3. Copy all files from the 'dist' folder into that nested directory
cp -r dist/* serve-test/tools/bentopdf/
# 4. Serve the 'serve-test' folder
npx serve serve-test

The website can be accessible at: http://localhost:3000/tools/bentopdf/

The npm run package command creates a dist-{version}.zip file that you can use for self-hosting.

Docker Subdirectory Deployment:

BentoPDF's Docker image also supports the BASE_URL build argument for subdirectory deployments:

# Build for subdirectory deployment
docker build --build-arg BASE_URL=/bentopdf/ -t bentopdf .# Run the container
docker run -p 3000:8080 bentopdf
# The app will be accessible at http://localhost:3000/bentopdf/

Combined with Simple Mode:

# Build with both BASE_URL and SIMPLE_MODE
docker build \
--build-arg BASE_URL=/tools/pdf/ \
--build-arg SIMPLE_MODE=true \
-t bentopdf-simple .
docker run -p 3000:8080 bentopdf-simple

Important:

  • Always include trailing slashes in BASE_URL (e.g., /bentopdf/ not /bentopdf)
  • The default value is / for root deployment

🚀 Run with Docker Compose (Recommended)

For a more robust setup with auto-restart capabilities:

  1. Download the repo and create a docker-compose.yml file or use the one given in repo:
services:
bentopdf:
image: bentopdf/bentopdf:latestcontainer_name: bentopdfports:
- '3000:8080'restart: unless-stopped
  1. Start the application:
docker-compose up -d

The application will be available at http://localhost:3000.

🏢 Simple Mode for Internal Use

For organizations that want a clean, distraction-free interface focused solely on PDF tools, BentoPDF supports a Simple Mode that hides all branding and marketing content.

What Simple Mode does:

  • Hides navigation, hero section, features, FAQ, testimonials, and footer
  • Shows only the essential PDF tools
  • Updates page title to "PDF Tools"
  • Perfect for internal company tools and educational institutions

For more details, see SIMPLE_MODE.md.

🔒 Security Features

BentoPDF runs as a non-root user using nginx-unprivileged for enhanced security:

  • Non-Root Execution: Container runs with minimal privileges using nginx-unprivileged
  • Port 8080: Uses high port number to avoid requiring root privileges
  • Security Best Practices: Follows Principle of Least Privilege

Basic Usage

docker build -t bentopdf .
docker run -p 8080:8080 bentopdf

For detailed security configuration, see SECURITY.md.

Digital Signature CORS Proxy (Required)

The Digital Signature tool uses a signing library that may need to fetch certificate chain data from certificate authority provider. Since many certificate servers don't include CORS headers, a proxy is required for this feature to work in the browser.

When is the proxy needed?

  • Only when using the Digital Signature tool
  • Only if your certificate requires fetching issuer certificates from external URLs
  • Self-signed certificates typically don't need this

Deploying the CORS Proxy (Cloudflare Workers):

  1. Navigate to the cloudflare directory:

    cd cloudflare
  2. Login to Cloudflare (if not already):

    npx wrangler login
  3. Deploy the worker:

    npx wrangler deploy
  4. Note your worker URL (e.g., https://bentopdf-cors-proxy.your-subdomain.workers.dev)

  5. Set the environment variable when building:

    VITE_CORS_PROXY_URL=https://your-worker-url.workers.dev npm run build

Production Security Features

The CORS proxy includes several security measures:

FeatureDescription
URL RestrictionsOnly allows certificate URLs (.crt, .cer, .pem, /certs/, /ocsp)
Private IP BlockingBlocks requests to localhost, 10.x, 192.168.x, 172.16-31.x
File Size LimitRejects files larger than 10MB
Rate Limiting60 requests per IP per minute (requires KV)
HMAC SignaturesOptional client-side signing (limited protection)

Enabling Rate Limiting (Recommended)

Rate limiting requires Cloudflare KV storage:

cd cloudflare
# Create KV namespace
npx wrangler kv namespace create "RATE_LIMIT_KV"# Copy the returned ID and add to wrangler.toml:# [[kv_namespaces]]# binding = "RATE_LIMIT_KV"# id = "YOUR_ID_HERE"# Redeploy
npx wrangler deploy

Free tier limits: 100,000 reads/day, 1,000 writes/day (~300-500 signatures/day)

HMAC Signature Verification (Optional)

⚠️ Security Warning: Client-side secrets can be extracted from bundled JavaScript. For production deployments with sensitive requirements, use your own backend server to proxy requests instead of embedding secrets in frontend code.

BentoPDF uses client-side HMAC as a deterrent against casual abuse, but accepts this tradeoff due to its fully client-side architecture. To enable:

# Generate a secret
openssl rand -hex 32
# Set on Cloudflare Worker
npx wrangler secret put PROXY_SECRET
# Set in build environment
VITE_CORS_PROXY_SECRET=your-secret npm run build

📦 Version Management

BentoPDF supports semantic versioning with multiple Docker tags available on both Docker Hub and GitHub Container Registry:

Docker Hub:

  • Latest: bentopdf/bentopdf:latest
  • Specific Version: bentopdf/bentopdf:1.0.0
  • Version with Prefix: bentopdf/bentopdf:v1.0.0

GitHub Container Registry:

  • Latest: ghcr.io/alam00000/bentopdf:latest
  • Specific Version: ghcr.io/alam00000/bentopdf:1.0.0
  • Version with Prefix: ghcr.io/alam00000/bentopdf:v1.0.0

Quick Release

# Release a patch version (0.0.1 → 0.0.2)
npm run release
# Release a minor version (0.0.1 → 0.1.0)
npm run release:minor
# Release a major version (0.0.1 → 1.0.0)
npm run release:major

For detailed release instructions, see RELEASE.md.

🚀 Development Setup

Option 1: Run with npm

  1. Clone the Repository:

    git clone https://github.com/alam00000/bentopdf.git
    cd bentopdf
  2. Install Dependencies:

    npm install
  3. Run the Development Server:

    npm run dev

    The application will be available at http://localhost:5173.

Option 2: Build and Run with Docker Compose

  1. Clone the Repository:

    git clone https://github.com/alam00000/bentopdf.git
    cd bentopdf
  2. Run with Docker Compose:

    docker-compose -f docker-compose.dev.yml up -d

    The application will be available at http://localhost:3000.

    Note: After making any local changes to the code, rebuild the Docker image using:

    docker-compose -f docker-compose.dev.yml up --build -d

    This ensures your latest changes are applied inside the container.


🛠️ Tech Stack & Background

BentoPDF was originally built using HTML, CSS, and vanilla JavaScript. As the project grew, it was migrated to a modern stack for better maintainability and scalability:

  • Vite: A fast build tool for modern web development.
  • TypeScript: For type safety and an improved developer experience.
  • Tailwind CSS: For rapid and consistent UI development.

Note: Some parts of the codebase still use legacy structures from the original implementation. Contributors should expect gradual updates as testing and refactoring continue.


🗺️ Roadmap

Planned Features:

  • HTML to PDF: Convert HTML files or web pages into PDF documents.
  • Markdown to PDF: Enhanced support for converting .md files to PDF.
  • Convert to PDF/A: Convert PDFs to the PDF/A archival format.
  • Edit PDF Content: Directly edit text and other content within your PDF.
  • PDF to Office: Converts PDF files into editable Word, Excel, and PowerPoint formats.
  • Office to PDF: Converts Word, Excel, and PowerPoint documents into optimized PDFs.

Contributions and discussions on the roadmap are welcome! Join the conversation via Discord.


🤝 Contributing

We welcome contributions from the community! Here's how you can get started:

  1. Fork the repository and create your branch from main.
  2. Follow the Getting Started steps to set up your local environment.
  3. Make your changes and commit them with a clear message.
  4. Open a Pull Request and describe the changes you've made.

Have an idea for a new tool or an improvement? Open an issue to discuss it first.

📖 Contributing to Documentation

Our documentation is built with VitePress. Here's how to contribute:

# Install dependencies
npm install
# Start docs dev server
npm run docs:dev
# Build docs for production
npm run docs:build
# Preview the built docs
npm run docs:preview

Documentation files are in the docs/ folder:

  • docs/index.md - Home page
  • docs/getting-started.md - Getting started guide
  • docs/tools/ - Tools reference
  • docs/self-hosting/ - Self-hosting guides (Docker, Vercel, Netlify, Hostinger, etc.)
  • docs/contributing.md - Contributing guide
  • docs/licensing.md - Commercial license info

Special Thanks

BentoPDF wouldn't be possible without the amazing open-source tools and libraries that power it. We'd like to extend our heartfelt thanks to the creators and maintainers of:

  • PDFLib.js – For enabling powerful client-side PDF manipulation.
  • PDF.js – For the robust PDF rendering engine in the browser.
  • PDFKit – For creating and editing PDFs with ease.
  • EmbedPDF – For seamless PDF editing in pure JS.
  • Cropper.js – For intuitive image cropping functionality.
  • Vite – For lightning-fast development and build tooling.
  • Tailwind CSS – For rapid, flexible, and beautiful UI styling.
  • qpdf and qpdf-wasm– A powerful command-line tool and library for inspecting, repairing, and transforming PDF file ported to wasm
  • cpdf – For content preserving pdf operations.
  • LibreOffice – For powerful document conversion capabilities.
  • PyMuPDF – For high-performance PDF manipulation and data extraction.
  • Ghostscript(GhostPDL) – Needs no Introduction.

Your work inspires and empowers developers everywhere. Thank you for making open-source amazing!

About

A Privacy First PDF Toolkit

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages