This is a technical decision aid. Confirm the current extension contract and validator evidence before implementation.
The JavaScript document generation ecosystem is split by output format. PptxGenJS is the practical free choice for PPTX, pdfmake/jsPDF/react-pdf cover different PDF models, ExcelJS dominates styled XLSX but still has no chart creation, and the docx package covers Word documents. Carbone and docxtemplater are template-first. Runstamp is schema-first: one JSON contract can generate PPTX, PDF, DOCX, and XLSX.
Use this guide as a routing page. If you already know the output format, jump to the focused guides for PowerPoint generation tools, DOCX to PDF in Node.js, ExcelJS charts alternatives, or JSON to PPTX.
Overview table
| Library | Primary formats | npm downloads, last week | Best fit | Main limitation |
|---|---|---|---|---|
| PptxGenJS | PPTX | 2.7M | Free JavaScript PowerPoint generation | PPTX only; you own layout logic |
| pdfmake | 2.3M | Declarative JSON-to-PDF | No native charts; table edge cases | |
| jsPDF | 12.7M | Canvas-style PDF drawing | Imperative layout | |
| @react-pdf/renderer | 4.9M | React component PDF generation | PDF only | |
| ExcelJS | XLSX | 12.4M | Styled spreadsheets and streaming writes | No chart creation |
| docx | DOCX | 6.0M | Word documents from TypeScript | Verbose for complex layouts |
| docxtemplater | DOCX, PPTX, XLSX templates | 826K | Filling Office templates with JSON | Template-first workflow |
| Carbone | DOCX, PDF, XLSX, PPTX, more | 20K | Template-based report generation | LibreOffice/template operational model |
| Runstamp | PPTX, PDF, DOCX, XLSX | New packages | Schema-first multi-format generation | Newer ecosystem; server-side |
1. PptxGenJS
PPTX · free · browser + server
PptxGenJS is the most established JavaScript library for generating PowerPoint presentations. It had 2.7 million weekly npm downloads for Jul 26-Aug 1, 2026.
Strengths: Widest chart type support among open-source PPTX libraries (bar, line, pie, scatter, area, doughnut, radar, bubble, combo, 3D). Works in all modern browsers, Node.js, React, Angular, Vite, and Electron. HTML-to-PPTX table conversion. Dual ESM/CJS builds. Only dependency: JSZip. MIT licensed.
Limitations: PPTX only — no PDF, DOCX, or XLSX. Slide animations are explicitly not on the roadmap. Single maintainer (Brent Ely). Some edge cases with repair dialogs in hyperlinked auto-paged tables (fixed in v4.0.1).
Best for: PPTX-only use cases, browser-side generation, teams wanting a free and proven library. For the broader landscape, see PowerPoint generation tools compared.
2. pdfmake
PDF · free · browser + server
pdfmake is a popular JSON-to-PDF library for JavaScript. It had 2.3 million weekly npm downloads for Jul 26-Aug 1, 2026.
Strengths: Declarative JSON API (similar philosophy to Runstamp). Works in both browsers and Node.js. Supports headers, footers, columns, tables of contents, watermarks, and custom fonts. Large community and extensive documentation. MIT licensed.
Limitations: PDF only. No native chart support (images only). Tables wider than the page overflow without warning (issue #441, open since 2015). rowSpan breaks across pages. Images require base64 encoding.
Best for: PDF-only use cases, browser-side PDF generation, teams wanting a free JSON-first library with large community adoption. See Runstamp vs pdfmake for a detailed comparison.
3. ExcelJS
XLSX · free · browser + server
ExcelJS is the most downloaded XLSX writer in this comparison with 12.4 million weekly downloads for Jul 26-Aug 1, 2026
and ~15,400 GitHub stars. It handles cells, formulas, styling, conditional formatting, tables, images, and streaming writes.
Strengths: Rich cell formatting API. Data validation. Streaming writes for large files. Tables with auto-filter. Good TypeScript support. MIT licensed.
Limitations: Zero chart creation support — the feature has been requested since June 2016 (issue #141). If charts are part of the deliverable, start with the ExcelJS chart gap analysis.
Best for: XLSX generation without charts — data exports, spreadsheets with formulas and styling, streaming large datasets. Not suitable for any use case requiring embedded charts.
4. docx
DOCX · free · browser + server
The docx npm package generates Word documents from JavaScript. It had 6.0 million weekly downloads for Jul 26-Aug 1, 2026. The API is builder-pattern based: you construct paragraphs, tables, and sections using objects and helper classes.
Strengths: Clean TypeScript API. Supports headers, footers, page numbers, tables of contents, images, hyperlinks, and bookmarks. Works in browsers and Node.js. MIT licensed.
Limitations: DOCX only. No chart support. No template system — every element must be constructed programmatically. The documentation site has weak SEO presence (low domain authority). The API is verbose for complex layouts.
Best for: DOCX-only generation from code. Contracts, letters, reports, and any document where the content is entirely data-driven. If the same workflow also needs PDF, compare DOCX to PDF in Node.js and the DOCX package guide.
5. Carbone
15+ formats · paid · server only
Carbone is a template-based document generation platform. Its npm package had 20K weekly downloads for Jul 26-Aug 1, 2026, and the product supports many output formats through a report-generation workflow.
Strengths: Design templates in Word, Excel, or LibreOffice — no code needed for layout. 15+ output formats. Pre-built integrations with Salesforce, HubSpot, Zapier, Make, N8N, Airtable, Bubble. MCP server for AI agents. Excellent customer support (per reviews).
Limitations: Requires LibreOffice for format conversion (Community Edition). Per-document pricing on Cloud plans. Template tag syntax has a learning curve. Server-side only.
Best for: Teams where non-technical users design document templates. Fixed-layout documents (invoices, contracts, certificates). No-code/low-code workflows. See Runstamp vs Carbone.
6. docxtemplater
DOCX, PPTX, XLSX templates · paid modules · browser + server
docxtemplater generates Office documents from templates filled with structured data such as JSON. Its npm package had 826K weekly downloads for Jul 26-Aug 1, 2026.
Strengths: Strong Office-template workflow. Non-developers can own the layout in Word or PowerPoint. Modules add images, charts, HTML, and other advanced template features.
Limitations: It is template-first, not schema-first. If the app needs to invent document structure from data or AI output, you still need a clean intermediate contract. See Runstamp vs docxtemplater.
Best for: Teams with existing Office templates and a clear mail-merge/report-fill workflow.
7. Aspose
20+ formats · paid · server only
Aspose is the enterprise incumbent for document processing. It supports 20+ file formats across .NET, Java, Python, C++, and Node.js. Per-format pricing starts at $1,199/yr
per developer.
Strengths: Every chart type. Every format conversion. 20 years of production use. Enterprise support and SLAs. The most complete document API available.
Limitations: Per-format, per-developer pricing — 4 formats × 5 developers = $23,980/yr. Node.js SDK wraps .NET binaries (50–200 MB per format). Difficult serverless deployment. Separate products for each format.
Best for: Enterprise teams on .NET or Java with budget for per-seat licensing. Regulatory environments with pre-approved vendor lists. Use cases requiring 20+ format coverage. See Runstamp vs Aspose.
8. Runstamp
4 formats · free + paid · server only
Runstamp is an open-core document generation engine that converts JSON schemas into PPTX, DOCX, PDF, and XLSX. The lite engines for all four formats are Apache-2.0 licensed. Pro unlocks Pro features across all four formats; Platform adds hosted render volume, priority support, and commercial embedding rights.
Strengths: One JSON schema → four output formats. Native editable charts in PPTX and XLSX. Pure JavaScript, zero native dependencies, under 5 MB total. MCP server for AI agents. Combo chart support. Flat-rate pricing (no per-document, no per-seat). Serverless compatible.
Limitations: New library, small community. Server-side only (no browser generation). Advanced Pro features require a paid plan. Cannot read or modify existing files. Four formats only (vs Carbone's 15+ or Aspose's 20+).
Best for: Multi-format generation from a single data source, AI agent document workflows, and teams that need PPTX + PDF + DOCX + XLSX without maintaining four separate libraries. See the quickstart tutorial and the MCP server docs.
Disclosure: Runstamp is our product. We built it because the four-library stack described in this article — PptxGenJS + pdfmake + docx + ExcelJS — required maintaining four separate codepaths with four separate data transformations for the same report. This article evaluates the libraries on their merits, including Runstamp's limitations.
Decision framework
| If you need... | Use | Why |
|---|---|---|
| PPTX only, free | PptxGenJS | Most practical free JavaScript PowerPoint library |
| PDF only with JSON definitions | pdfmake | Declarative PDF model and large ecosystem |
| React component PDF rendering | @react-pdf/renderer | Fits React mental model |
| XLSX without charts | ExcelJS | Rich cell/formula API and streaming writes |
| XLSX with charts | Runstamp or xlsx-chart | ExcelJS does not create charts |
| DOCX only | docx | Clean TypeScript API for Word files |
| Office templates filled with JSON | docxtemplater or Carbone | Template owner controls layout |
| Enterprise all-format SDK | Aspose | Broadest document API coverage |
| One JSON schema to PPTX, PDF, DOCX, XLSX | Runstamp | One data contract across output formats |
| AI agent document generation | Runstamp | JSON schema boundary avoids raw OOXML generation |
Keep the document workflow in your product.
Use the catalog to select a native action, prove it against a real artifact, then embed review and release evidence where your customer already works.

