A lightweight, customizable PDF viewer that works seamlessly with any JavaScript project. No dependencies, no hassle.
MIT licensed, no paywalls, no limits. Skip overpriced SDKs with full source access.
Extensive API for complete control. Themes, annotations, search, and more.
Works with JavaScript or TypeScript projects. React, Vue, Svelte, or vanilla.
Get started in seconds with just two lines of code
<!-- 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.0.0-next.4/dist/embedpdf.js';
const viewer = EmbedPDF.init({
type: 'container',
target: document.getElementById('pdf-viewer'),
src: 'https://snippet.embedpdf.com/ebook.pdf'
})
</script>Interact with our PDF viewer below - zoom, scroll, and navigate through pages
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've simplified their PDF integration with EmbedPDF.