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.
Choose the level of control that fits your project
A polished, production-ready PDF viewer that drops into your app in seconds. Perfect for standard use cases.
MIT licensed core. Whether you use the snippet or headless, you own the code. No black boxes.
Configurable theming for the Viewer, or 100% pixel-perfect control with our Headless libraries.
Works with any framework. Drop the snippet in a legacy app, or build a modern React/Vue/Svelte SPA.
See how easy it is to add the pre-built viewer to your app.
<!-- 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>This is the default UI you get with our snippet.
Don't like how it looks? Use Headless to build something completely different.
When the standard UI holds you back, our headless libraries set you free.
Seamlessly blend the viewer into your app. Render PDF pages directly inside your own components.
Overlay custom data, build annotation tools that sync with your backend, or create AI-powered analysis views.
Load only what you need. No bloated UI bundles. Perfect for mobile apps and high-performance dashboards.
See what teams are building with EmbedPDF
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.

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.

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