JavaScript PDF libraries — create, modify, render PDFs in browser + Node — pdf-lib, PDFKit, jsPDF, pdfmake
The most versatile free JavaScript PDF library — pdf-lib is a pure-JavaScript (no native dependencies) MIT-licensed engine that runs in both the browser and Node.js and uniquely both creates new PDFs AND modifies existing ones: draw text, vector paths, and images; embed fonts; fill and read AcroForm fields; merge, split, rotate, copy, and remove pages; and add attachments. Modern TypeScript-first async API, ~7k+ GitHub stars, actively maintained by Hopding. No paid tier, no SaaS — install with npm and use it forever.
- Bandwidth
- n/a
- Requests
- Unlimited use — MIT npm package, no quotas
- Paid from
- $0/mo
Visit site ↗
The original low-level PDF-generation engine for Node.js — PDFKit is a mature MIT-licensed library (since 2012, ~9k+ GitHub stars) for generating PDFs programmatically from scratch: vector graphics, text with embedded TrueType/OpenType fonts, images, gradients, annotations, and links. It is the foundation that higher-level libraries like pdfmake build on top of. Originally Node.js-focused (uses some Node APIs) with browser builds available via bundlers. No paid tier, no SaaS — the low-level primitives for full control over PDF layout.
- Bandwidth
- n/a
- Requests
- Unlimited use — MIT npm package, no quotas
- Paid from
- $0/mo
Visit site ↗
The most popular JavaScript PDF library — jsPDF is a browser-first MIT-licensed library (~30k+ GitHub stars) for generating PDFs directly client-side in the browser with no server round-trip: text, images, shapes, form fields, and HTML-to-PDF via plugins (html2canvas, autotable, svg). Works in Node.js too, but the browser is its sweet spot. A rich plugin ecosystem extends it for tables, SVG, and HTML. No paid tier, no SaaS — the default pick for client-side PDF generation.
- Bandwidth
- n/a
- Requests
- Unlimited use — MIT npm package, no quotas
- Paid from
- $0/mo
Visit site ↗
The declarative layout-based PDF library — pdfmake is an MIT-licensed engine (~12k+ GitHub stars) built on top of PDFKit where you describe a document as a JSON object (content array + styles + layout rules) and get a PDF, instead of imperatively drawing on a canvas. Ideal for structured documents like reports, invoices, tables, and multi-column layouts with automatic pagination and flow. Runs in browser and Node.js. No paid tier, no SaaS — the pick when you want to declare what the document looks like, not how to draw it.
- Bandwidth
- n/a
- Requests
- Unlimited use — MIT npm package, no quotas
- Paid from
- $0/mo
Visit site ↗