PptxGenJS is a JavaScript library that generates PowerPoint presentations programmatically without requiring Microsoft Office or a license.
The library solves the problem of creating presentations dynamically by building standards-compliant Open Office XML files directly from code. It works across Node.js, React, Vite, Electron, and web browsers, outputting PPTX files compatible with PowerPoint, Keynote, LibreOffice Impress, and Google Slides. Developers can define slides, charts, images, tables, shapes, and custom slide masters through a JavaScript API, then export the result as a downloadable file, base64 string, Blob, Buffer, or Node stream. The library includes a distinctive HTML-to-PowerPoint feature that converts HTML tables into slides with a single function call.
Adopt this tool if you need to generate presentations from code without manual PowerPoint work or server-side Office installations. It suits applications that build reports, dashboards, or templated presentations on demand, as well as browser-based presentation builders. The library handles SVGs, animated GIFs, YouTube embeds, RTL text, and Asian fonts. TypeScript definitions provide full autocomplete and inline documentation, and the project includes 75 demo slides covering every feature.
The project maintains active development with regular updates addressing user requests and edge cases. The codebase shows consistent attention to cross-platform compatibility, with dual ESM and CJS builds and zero runtime dependencies beyond JSZip. Documentation is comprehensive, including live browser-based demos that require no setup, and the library prioritizes ease of use alongside feature completeness, allowing presentations to be created in just four lines of code.