JSZip

Create, read, and edit ZIP files directly in JavaScript, in the browser or Node.js.

Library
npm
v3.10.2
10,392 stars
MIT OR GPL-3.0-or-later

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
64 /100 Good
Development Activity 48
Maintenance 24
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 78
Code Quality 70
Innovation 75
Learning Curve 75

JSZip is a JavaScript library for creating, reading, and editing ZIP archives without any server-side dependency. It exposes a chainable file/folder API for building an archive in memory, plus Promise- and stream-based methods for generating the final ZIP as a blob, base64 string, typed array, or Node buffer/stream.

The same API also reads existing ZIP files back into that file/folder tree, with optional CRC32 integrity checking, so archives can be created, inspected, and re-packaged using one consistent interface across browser and Node.js environments.

What You Get

  • A dependency-light JSZip class for building ZIP archives in-memory from strings, binary data, base64, ArrayBuffers, Blobs, or Node streams
  • A loadAsync() reader that parses existing ZIP files, including nested folders and CRC32 verification, back into the same file/folder API
  • Multiple output formats — blob, base64, Uint8Array, ArrayBuffer, or Node Buffer/stream — via generateAsync()/generateNodeStream()
  • Bundled TypeScript type definitions (index.d.ts) for editor autocomplete with no separate @types package required
  • A prebuilt browser bundle (dist/jszip.min.js) alongside the Node/CommonJS entry point

Common Use Cases

  • Bundling multiple generated files (reports, exports, images) into a single downloadable ZIP in the browser
  • Reading uploaded ZIP archives client-side to preview or extract their contents without a server round-trip
  • Packaging build artifacts or generated documents as ZIPs in Node.js scripts and CI pipelines
  • Implementing “export all as ZIP” features in web apps, such as downloading a folder of user files at once

Under The Hood

Architecture The JSZip constructor (lib/index.js) creates an instance with a null-prototype files map; prototype methods from lib/object.js (file, folder, forEach, filter, remove, generateInternalStream/generateAsync/generateNodeStream) operate on that tree. Loading an existing archive flows through lib/load.js, which uses lib/reader/* (ArrayReader, Uint8ArrayReader, NodeBufferReader, StringReader, dispatched via readerFor.js) to parse ZipEntries (lib/zipEntries.js, zipEntry.js) and optionally verify CRC32 via lib/stream/Crc32Probe.js. Output generation runs through lib/generate/index.js and ZipFileWorker.js, which chain GenericWorker-derived stream stages (lib/stream/GenericWorker.js, DataWorker.js, DataLengthProbe.js, ConvertWorker.js, StreamHelper.js) via .pipe() — a hand-rolled stream abstraction that mirrors Node streams but works unmodified back to IE6, ultimately exposed through StreamHelper’s accumulate()/toNodejsStream() for Promise or stream consumption.

Tech Stack Runtime dependencies are minimal: pako (~1.0.2) for DEFLATE/INFLATE compression, lie (~3.3.0) as an ES5-safe Promise polyfill exposed via lib/external.js, readable-stream (~2.3.6) for the Node stream shim (swapped for a browser-specific file via the package.json browser field), and setimmediate. Build tooling is Grunt plus Browserify for the bundled browser build (dist/jszip.min.js), with hand-written TypeScript declarations (index.d.ts) checked via tsc in the test script rather than the library itself being authored in TypeScript. The source is CommonJS, ES5-style (var, no destructuring) — a reflection of the library’s long history (created 2009) rather than neglect, though it does mean there’s no native ESM entry point.

Code Quality Test coverage is broad: test/asserts/ holds one file per feature area (file.js alone has 76 assertions, plus generate.js, load.js, stream.js, permissions.js, unicode.js, and more), run via QUnit in both Node (test-node) and real browsers through Playwright (test-browser), plus a tsc pass validating the type definitions against the JS API. ESLint runs with eslint:recommended plus stricter rules (eqeqeq, curly, no-caller, guard-for-in, 4-space indent, double quotes), enforced in CI on every push/PR (.github/workflows/main.yml). Error handling is consistent but dated — explicit Error throws with upgrade-guide messages for removed 2.x methods, Promise .catch/worker error events rather than typed errors — and the project’s own health signals show low recent commit and maintenance activity despite the large existing test surface.

API Design The public API is small and chainable: new JSZip(), .file()/.folder()/.remove() for the tree, .generateAsync()/.generateNodeStream() for output, and static JSZip.loadAsync() for reading — all reachable from a single default export with almost no setup ceremony (three lines to zip a file and produce a blob, per the README example). Type definitions ship inside the package (index.d.ts), giving IDE autocomplete with no separate @types install. The main friction is legacy holdovers: removed synchronous .generate()/constructor-with-args paths throw pointed but easy-to-miss errors directing users to the upgrade guide, and the full documentation lives on an external GitHub Pages site (stuk.github.io/jszip) rather than in the README, so newcomers need to leave the package to find anything past the basic example.

Used by 66 apps in this directory

TypeScript
82%
MIT

clawless

AI Agents · Developer Tools

541

Run Claw AI agents entirely in the browser — no server required — with WebContainers WASM sandboxing, policy enforcement, and complete audit logging.

View details
36
Repo Health
71
Technical
84
Dependency
Built with
TypeScript 82%
Updated 3 months ago
Go
75%
AGPL 3.0

Coder

Code Editors · Developer Tools · Devops

17,157

Self-hosted cloud development environments and AI coding agents — defined in Terraform, connected via WireGuard, automatically shut down when idle.

View details
91
Repo Health
90
Technical
66
Dependency
Built with
Go 75%
TypeScript 23%
Updated 5 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,652

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
67
Repo Health
76
Technical
63
Dependency
Built with
JavaScript 90%
Updated 1 weeks ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,303

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
66
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 1 weeks ago
TypeScript
95%
AGPL 3.0

Docmost

CMS · Collaboration · Note Taking

22,079

Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.

View details
89
Repo Health
70
Technical
66
Dependency
Built with
TypeScript 95%
Updated 5 days ago
JavaScript
99%
AGPL 3.0

drawDB

Databases

40,114

Design database schemas visually in your browser and export executable SQL for any major database — no account required.

View details
78
Repo Health
70
Technical
73
Dependency
Built with
JavaScript 99%
Updated 6 days ago
TypeScript
100%
Other

Dub

Analytics · Marketing

24,935

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
81
Repo Health
78
Technical
62
Dependency
Built with
TypeScript 100%
Updated 5 days ago
TypeScript
94%
AGPL 3.0

Element Web

Collaboration · Team Chat

13,609

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
64
Dependency
Built with
TypeScript 94%
Updated 6 days ago
TypeScript
95%
Apache 2.0

Enclosed

Security

2,099

Send end-to-end encrypted notes and files where the server never sees your content — true zero-knowledge sharing.

View details
78
Repo Health
88
Technical
71
Dependency
Built with
TypeScript 95%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers