Open Source & Framework Agnostic

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.

Works seamlessly with

JavaScript
TypeScript
React
Vue
Svelte

Two ways to integrate

Choose the level of control that fits your project

Ready-made Viewer

Batteries Included

A polished, production-ready PDF viewer that drops into your app in seconds. Perfect for standard use cases.

  • Beautiful default UI
  • 2 lines of code
  • Fully responsive & accessible
npm install @embedpdf/snippet

Headless Components

Full Control

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

  • 100% UI Control
  • Tiny bundle size
  • React, Vue, Svelte hooks
npm install @embedpdf/core
Read Documentation

Truly Open Source

MIT licensed core. Whether you use the snippet or headless, you own the code. No black boxes.

Flexible Architecture

Configurable theming for the Viewer, or 100% pixel-perfect control with our Headless libraries.

Universal Compatibility

Works with any framework. Drop the snippet in a legacy app, or build a modern React/Vue/Svelte SPA.

Ready-made Viewer

Drop-in Integration

See how easy it is to add the pre-built viewer to your app.

index.html
<!-- Add the PDF container -->
<div id="pdf-viewer" style="height: 500px"></div>

<!-- Initialize EmbedPDF -->
<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>

Try the Ready-made Viewer

This is the default UI you get with our snippet.
Don't like how it looks? Use Headless to build something completely different.

Loading PDF Viewer...
Headless Components

Why go Headless?

When the standard UI holds you back, our headless libraries set you free.

Native Look & Feel

Seamlessly blend the viewer into your app. Render PDF pages directly inside your own components.

Deep Integration

Overlay custom data, build annotation tools that sync with your backend, or create AI-powered analysis views.

Performance First

Load only what you need. No bloated UI bundles. Perfect for mobile apps and high-performance dashboards.

Loved by developers

See what teams are building with EmbedPDF

"
Stirling PDFStirling-PDF
PDF Tools
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 Stirling
Anthony Stirling
CTO & Founder
Stirling PDF
"
Grella
AI Citations
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 Aitali
Hamza Aitali
Founder
Grella

Ready to transform your PDF experience?

Join thousands of developers who have chosen the open-source path. No vendor lock-in, no black boxes, just code.