EmbedPDF

Embed PDF files without the pain

The ultimate Open Source PDF viewer for JavaScript. Choose our drop-in component for instant results, or use our headless library to build a completely custom UI.

4K+stars1M+downloadsApache-2.0 licensed
EmbedPDF viewer
import { PDFViewer } from '@embedpdf/viewer-react';export function App() {  return (    <PDFViewer      src="/report.pdf"      style={{ height: '100vh' }}    />  );}
Start embedding in minutes
  • Copy a few lines of code
  • Configure your options
  • You're live! 🚀
Integration

Two ways to integrate

Choose the level of control that fits your project.

Recommended for speed

Ready-made Viewer

A polished, production-ready PDF viewer that drops into your app in seconds.

  • Drop-in component
  • Fastest way to launch
  • Prebuilt toolbar and layout
Recommended for customization

Headless Components

Build your own custom viewer UI from scratch. We provide the engine, you control the pixels.

  • Build your own UI
  • Full composability
  • Plugin-friendly
Capabilities

Everything you need for modern PDF workflows

Packed with features to handle real-world use cases with ease.

Forms

Fill and save interactive PDF forms.

Search

Find text across the entire document.

Redaction

Permanently redact sensitive content.

Stamps

Add and manage document stamps.

Quick Start

Get started in minutes

Copy, paste, and start embedding PDFs in seconds. No build step. No bloat. Works with your stack, today.

<div id="pdf-viewer" style="height: 500px"></div>
<script type="module">
import EmbedPDF from 'https://cdn.jsdelivr.net/npm/@embedpdf/viewer@3/dist/embedpdf.js';

EmbedPDF.init({
target: '#pdf-viewer',
src: '/pdfs/welcome.pdf',
onReady: (viewer) => console.log('PDF viewer ready!', viewer),
});
</script>

Open source

Apache-2.0 licensed and built transparently for the community.

Production ready

Secure, reliable, and trusted by thousands of developers.

Works with your stack

Drop in with Vanilla JS, React, Vue, Svelte, and more.

Open source proof

Built in the open.

EmbedPDF is backed by real developer adoption: npm downloads, GitHub stars, and active participation in the PDF ecosystem.

1M+monthly downloads on npm

Trusted by developers worldwide to embed PDFs at scale — from indie tools to enterprise document platforms.

4K+GitHub stars

A growing community of developers building the future of PDF on the web.

github.com
PDFAssociation member

Proud member of the PDF Association advancing the future of PDF.

pdfa.org
Developer stories

Loved once it is
in the product

From quick embeds to custom document workflows, developers use EmbedPDF to ship faster and stay in control.

Align
Legal software
Sponsor
Sam Davidoff

PDFs are the lifeblood of legal work. EmbedPDF is what we have been searching for since we started our legal software company. A library that excels at handling PDFs and their annotations in a way that is performant, accessible, open and secure. That it is also free is icing on the cake.

Sam DavidoffCEO at Align
Stirling PDF
PDF tools
Anthony Stirling

I love the modular plugin architecture, the flexibility to integrate and customize however we need has been invaluable. A great open-source product with an amazing license and community of developers ready to help.

Anthony StirlingCTO & Founder at Stirling PDF
Grella
AI citations
Hamza Aitali

After fighting with PDF.js in the browser, we found EmbedPDF with its first-class Svelte support. Within minutes we had something working, its extensible nature gave us the control we needed to build citation highlighting on top. Not a single regret.

Hamza AitaliFounder at Grella