Javascript pdf viewer

One PDF viewer to rule them all

Integrate advanced document viewing, annotations, forms, signing, and editing capabilities into your web apps using any JavaScript framework. Whether you prefer the convenience of client-side rendering and processing or powerful server-side performance and security, we have you covered.

Customizable javascript PDF VIEWER

Customizable to match your use case and brand

Digital document with toolbar spanning along the top of the doc, and labels above describing the functionality of each tool in Nutrient PDF Viewer.Toolbar of web user interface explained with labels

Benefits of building with us

a hand held up with trees in the background and the sun peering through the trees and the fingers of the hand.

Ship faster

Build faster with our JavaScript PDF Viewer’s easy setup, detailed docs, and plug-and-play code. Process PDFs client-side for ease and offline, with server support for performance and security.

Save on engineering time

Save time and resources by choosing to build with our JavaScript PDF Viewer. No more bugs and open source nightmares. Just performant document support without the headaches.

Customize the UI to your needs

Seamlessly blend our web viewer into your app through your own custom UI and brand identity so that no user would ever know you didn’t build it yourself.

AI at your fingertips

Easily deliver AI functionality with AI Assistant. Whether you’re looking to add AI summarization, translation, redaction, data extraction, or comparison, our web viewer is the simplest way to add intelligence to your documents.

Relied upon by industry leaders

Autodesk logo
UBS logo
IBM logo
UBS logo
IBM logo

EXAMPLES

Just a couple lines of code

1import PSPDFKit from "pspdfkit";
2
3const instance = await PSPDFKit.load({
4	container: "#pspdfkit",
5	document: "<pdf-file-path>",
6	licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
7});
8
9console.log("PSPDFKit for Web is ready!");
10console.log(instance);
1const PSPDFKit = require("pspdfkit");
2
3PSPDFKit.load({
4	container: "#pspdfkit",
5	document: "<pdf-file-path>",
6	licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
7}).then(function(instance) {
8	console.log("PSPDFKit for Web is ready!");
9	console.log(instance);
10})
1import PSPDFKit from "pspdfkit";
2
3const instance = await PSPDFKit.load({
4	container: "#pspdfkit",
5	document: "<pdf-file-path>",
6	licenseKey: "YOUR_LICENSE_KEY_GOES_HERE",
7	toolbarItems: [...PSPDFKit.defaultToolbarItems, {
8		type: "custom",
9		id: "my-button",
10		title: "My Button",
11		onPress: event => {
12			alert("hello from my button");
13		}
14	}]
15});
1const PSPDFKit = require("pspdfkit");
2
3PSPDFKit.load({
4	container: "#pspdfkit",
5	document: "<pdf-file-path>",
6	licenseKey: "YOUR_LICENSE_KEY_GOES_HERE",
7	toolbarItems: PSPDFKit.defaultToolbarItems.concat([{
8		type: "custom",
9		id: "my-button",
10		title: "My Button",
11		onPress: function(event) {
12			alert("hello from my button");
13		}
14	}])
15});
1import PSPDFKit from "pspdfkit";
2
3const instance = await PSPDFKit.load({
4container: "#pspdfkit",
5document: "<pdf-file-path>",
6licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
7});
8
9const annotation = new PSPDFKit.Annotations.LineAnnotation({
10	pageIndex: 0,
11	startPoint: new PSPDFKit.Geometry.Point({ x: 95, y: 95}),
12	endPoint: new PSPDFKit.Geometry.Point({ x: 195, y: 195}),
13	boundingBox: new PSPDFKit.Geometry.Rect({
14		left: 90,
15		top: 90,
16		width: 200,
17		height: 200,
18	}),
19});
20
21instance.createAnnotation(annotation);
1const PSPDFKit = require("pspdfkit");
2
3PSPDFKit.load({
4	container: "#pspdfkit",
5	document: "<pdf-file-path>",
6	licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
7}).then(instance => {
8	const annotation = new PSPDFKit.Annotations.LineAnnotation({
9		pageIndex: 0,
10		startPoint: new PSPDFKit.Geometry.Point({ x: 95, y: 95}),
11		endPoint: new PSPDFKit.Geometry.Point({ x: 195, y: 195}),
12		boundingBox: new PSPDFKit.Geometry.Rect({
13			left: 90,
14			top: 90,
15			width: 200,
16			height: 200,
17		}),
18	});
19
20	instance.createAnnotation(annotation);
21})

Web Playground

Looking for the code? Come play in our sandbox

a screenshot of Nutrient's code sandbox called the web playground where a code text editor is on the left and the visual UI of the pdf viewer is on the right.a mobile sized screenshot of Nutrient's code sandbox called the web playground showing a code text editor on the top and the visual UI of the viewer on the bottom.

Example integrations and guides

Migration guide

Deployment Options

Choose the right deployment option for you

Nutrient Web Viewer SDK operates fully client-side with in-browser processing, or it can be combined with either Document Engine or DWS Viewer API for server-side document streaming, real-time collaboration, and powerful performance.

Web Viewer SDK

Web Viewer SDK + Document Engine

DWS Viewer API

User interface

HTML5-based

HTML5-based

HTML5-based

Deployment

Viewer: In-browser via WebAssembly

Viewer: In-browser

Rendering: Self-hosted (with Docker), or managed by Nutrient

Viewer: In-browser

Rendering: Hosted in the cloud by Nutrient

Rendering

Client-side

Server-side

Server-side

Key notes

  • Deploy instantly with JavaScript and the Baseline UI design system
  • Handle form filling and annotations using XFDF or Instant JSON
  • Opt to keep documents offline and in-browser for added security
  • Leverage for lightweight workflows or prototyping without infrastructure
  • Stream pages on demand for faster load times and large file handling
  • Secure document access with JWTs and manage at scale
  • Enable real-time collaboration and document syncing with Instant
  • Access server-side features like OCR, AI Assistant, and advanced processing
  • Stream documents from the cloud with fast, consistent performance
  • Enable form filling, annotations, and signing with no backend setup
  • Support real-time collaboration via Instant
  • Keep documents off devices — content stays secure in the cloud
  • Access advanced features like OCR and Office conversion

Documentation

Get startedGet startedGet started

View and render documents where you want

WebAssembly

Our JavaScript PDF viewer runs completely in browser leveraging Wasm technology

Three unique blocks showing how native browser support and a web app can be assembled with Nutrient Web SDK.

Document Engine

Ensure control over your data by pairing Web Viewer SDK with our self-hosted Document Engine via Docker

Nutrient Document Engine shown with a complete infrastructure flow going from client app to HTTP to

DWS Viewer API

Easily leverage our cloud backend with Web Viewer SDK for fast, secure document rendering — no infrastructure needed.

a visual diagram showing the architecture of setting up Nutrient's Cloud backend with their PDF Viewer. The picture shows a diagram line with nodes labled Nutrient Cloud on top, your backend on the left, your app on the bottom left and Nutrient Web SDK on the bottom right with a graphical image of their PDF viewer that shows a PDF with text "To the moon".

Pick only the tools you need

Our document Web Viewer SDK is a complete suite of tools made to grow with your web app and users’ needs. Start with what you need today and easily add more tools in the future. Our JavaScript PDF Viewer is built to support multi-platform applications, ensuring compatibility across desktop, mobile, and cloud-based apps.

Viewing

Open all documents with high fidelity in a well-designed viewer.

Open all documents with high fidelity in a well-designed viewer.

Comparison

Visually compare documents side by side.

Visually compare documents side by side.

Markup

Improve the review process with a suite of annotation tools.

Improve the review process with a suite of annotation tools.

Collaboration

Bring real-time collaboration to your documents.

Bring real-time collaboration to your documents.

Editing

Modify documents and easily edit PDF text directly in your app.

Modify documents and easily edit PDF text directly in your app.

Forms

Easy for users to fill forms. Easy for you to create them programmatically.

Easy for users to fill forms. Easy for you to create them programmatically.

Redaction

Automatically and permanently remove sensitive and personal information from documents.

Automatically and permanently remove sensitive and personal information from documents.

Signing

Streamline contract execution and approval workflows by enabling eSignatures and PDF digital signatures.

Streamline contract execution and approval workflows by enabling eSignatures and PDF digital signatures.

Generation

Effortlessly generate PDFs from HTML and DOCX.

Effortlessly generate PDFs from HTML and DOCX.

OCR and Data Extraction

Give new life to scanned documents by easily converting them into text that’s selectable and searchable.

Give new life to scanned documents by easily converting them into text that’s selectable and searchable.

Conversion

Easily convert any Office document, image, email, or webpage into a high-quality PDF.

Easily convert any Office document, image, email, or webpage into a high-quality PDF.

Scanning and Barcodes

Capture and process information from physical documents and products.

Capture and process information from physical documents and products.

Security and Compliance

Protect sensitive information and meet regulatory requirements within your application.

Protect sensitive information and meet regulatory requirements within your application.

Frequently asked questions

What core features does Nutrient’s Web Viewer offer?

Our Web Viewer is a JavaScript PDF viewer that developers can integrate to enable their users to view, annotate, edit, and sign PDF documents directly within their web applications. It supports high-fidelity rendering, form viewing and filling, redaction, text editing, text comparison, measurement tools, comments, and so much more.

Is the JavaScript PDF Viewer compatible with various JavaScript frameworks?

Yes. Nutrient’s Web Viewer SDK is designed for seamless integration with all major JavaScript frameworks, including React, Angular, Vue, Svelte, and Next.js. It requires only a DOM container for appending the viewer, ensuring flexibility across different development environments.

Can the JavaScript PDF Viewer be customized to match the look and feel of an application?

Nutrient Web Viewer SDK makes it easy to customize every part of the user interface. Our robust API for configuring behavior and appearance lets you hide or add buttons, change the theme to match your look and feel, trigger workflows, create overlays, and much more. See our user interface customization guide for more details.

Does the JavaScript PDF Viewer support client-side processing, and what are its benefits?

Yes. Nutrient Web Viewer SDK supports completely in-browser client-side PDF processing and rendering by leveraging the latest WebAssembly technology. This approach offloads processing to the browser, reducing server dependency, enabling offline processing, and enabling the ability to integrate it into other low-code applications on major business platforms like Salesforce, SharePoint, Mendix, and more.

What deployment options are available for the JavaScript PDF Viewer?

The Web Viewer SDK supports three flexible deployment options to fit your technical needs:

1) a fully client-side deployment that runs entirely in the browser powered by WebAssembly technology;

2) a paired deployment with Document Engine for advanced control and server-side performance; or

3) integration with our cloud-hosted DWS Viewer API for backend-performant features without any backend setup.

The variety of deployment options gives you the freedom to choose the best model for your application and use case needs.

Is the JavaScript PDF Viewer compatible with various browsers and platforms?

Yes. Nutrient’s Web Viewer SDK ensures compatibility across all major web browsers, including Chrome, Firefox, Safari, Edge, and Firefox ESR. It also supports cross-platform applications, ensuring consistent performance on desktop and mobile, and in cloud-based solutions.

How does the JavaScript PDF Viewer ensure document security and compliance?

Nutrient Web Viewer SDK supports features such as digital signatures, redaction, and encryption that enable users to maintain document security and compliance with regulations such as GDPR, HIPPA, and more. Further, our client-side deployment inherently ensures data privacy by only processing documents on the client's device. Finally, Nutrient has been SOC2 type 3 certified and continuously monitors, maintains, audits and updates our internal security procedures as well as regularly engage in third party penetration testing of all our software.

JavaScript PDF Viewer

What is a JavaScript PDF Viewer?

A JavaScript PDF Viewer is a developer toolkit that allows you to embed powerful PDF features — like viewing, editing, annotating, and signing — directly into web applications using JavaScript. Nutrient’s web PDF SDK delivers high-performance rendering, a customizable UI, and built-in tools for collaboration, redaction, and compliance — all without relying on external apps.

  • Fast, high-fidelity PDF rendering in the browser.
  • Full support for annotations, editing, and signing.
  • Drag-and-drop viewer customization with JavaScript APIs.
  • Secure, client-side processing with optional server-side support.
  • Works across all modern browsers and JavaScript frameworks.

How to choose the right JavaScript PDF Viewer?

When choosing a JavaScript PDF Viewer, developers should prioritize flexibility, performance, and ease of integration. Here’s what to consider:

  • Rendering speed and fidelity — Can it handle large PDFs without lag or errors in rendering?
  • UI customization — Does it allow deep customization of the user interface, such as the toolbars and layout?
  • Browser compatibility — Is it stable across all major browsers, such as Chrome, Firefox, Safari, and Edge?
  • Accessibility — Does it support encryption, redaction, and digital signatures?
  • Build versus buy — Do you have advanced feature needs that aren’t supported by open source? Do you want to maintain, bug fix, and do security patches building on top of open source, or would you rather get that from a dedicated commercial library?

How does Nutrient JavaScript PDF Viewer solve my web viewing PDF needs?

  • Fast, high-fidelity viewer — Ten years of development on top of a PDFium engine, plus optional streaming Document Engine lets even multi-GB PDFs render quickly in any modern browser.
  • Complete toolkit in one SDK — Viewing, 17 annotation types, form fill/creation, page edits, redaction, measurement, Office/CAD image support and, eSigning all ship together.
  • Secure and standards-compliant — Runs fully client-side if you need; supports WCAG 2.1 AA/PDF-UA; and validates digital signatures for eIDAS, HIPAA, and GDPR workflows.
  • Drop-in and customizable — Clean JavaScript API with React/Vue/Angular examples, plus a modular, themeable UI that can be branded or slimmed down in minutes.
  • Built for production — Regular releases, SLA-backed enterprise support, clear licensing and indemnification — saving months you’d spend stitching together open source parts.

What are the benefits of using Nutrient’s JavaScript PDF Viewer?

Nutrient (formerly PSPDFKit) is built for developers who want control, speed, and flexibility without compromise — perfect for embedding rich PDF workflows directly into your browser-based app.

  • Fast setup, faster performance — Load and display complex or large PDF files in seconds.
  • Customize everything — Toolbars, buttons, layouts — tweak it all with clean JS APIs.
  • Rich feature set — Viewing, markup, form filling, digital signing, redaction, and more.
  • Lightweight and secure Processes files in the browser or server-side, depending on your use case.
  • Scalable for enterprises or startups — Built for everything from internal tools to high-traffic apps.

How does Nutrient’s JavaScript PDF Viewer compare to other PDF solutions?

Nutrient Web Viewer SDK is the best in its category for being flexible, fast, and easy to use for developers. This is especially true when you want to use full PDF functionality without giving control to other viewers.

  • More customization — Tailor the viewer and tools to your exact UI/UX needs.
  • Superior speed — Handles embedded fonts, complex layouts, and large PDFs effortlessly.
  • Superior DX — Integrate quickly into any frontend stack with the best developer experience on the market.
  • Accessibility out of the box – Keyboard navigation, screen reader labeling, PDF/UA tagging, and WCAG-conforming UI help you hit Section 508 and EN 301 549 targets.
  • Documentation you’ll actually like — Clear examples, interactive demos, and fast-start boilerplate code.