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/react'

export default function App() {
  return (
    <PDFViewer
      src="./ebook.pdf"
      style={{ height: 500 }}
    />
  )
}
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.

Annotations

Highlight, underline, draw and add notes.

Forms

Fill and save interactive PDF forms.

Signatures

Add, save and manage e-signatures.

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 async type="module">
import EmbedPDF from 'https://cdn.jsdelivr.net/npm/@embedpdf/snippet@2/dist/embedpdf.js';

const viewer = EmbedPDF.init({
type: 'container',
target: document.getElementById("pdf-viewer"),
src: 'https://snippet.embedpdf.com/ebook.pdf'
})
</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.

01
Getting started
March 2024
Jason Miller

Integrating EmbedPDF took us less than a day. The docs are fantastic and the API is super easy to work with.

Jason MillerSenior Frontend Engineer at Acme Inc.
02
Scaling with confidence
May 2024
Sarah Chen

We scaled to millions of document views without worrying about performance. EmbedPDF just works.

Sarah ChenEngineering Lead at DataFlow
03
Building better products
July 2024
David Ramirez

Our users love the fast, native-like experience. EmbedPDF helps us deliver a premium product every time.

David RamirezCTO at Papertrail