GitHub
Open Source — Drop-in Archive SDK

A better zip download
experience. 1 line of code.

Upgrade your website's download experience. Intercept zip files and launch a ZipLayer wizard that streams the archive into the browser, previews its contents, and lets users grab exactly what they need — no unzip utility required.

<zip-layer-modal src="https://portal.com/api/export.zip"></zip-layer-modal>
⚡

Zero Setup

No backend, no build step, no worker files to eject. Drop in the component and it works — all processing happens inside the browser.

🔍

X-Ray Preview

Stream the archive into your browser and inspect the directory tree before downloading anything. See what you're getting, then decide.

⬇️

Selective Download

Stop forcing users to download one massive zip. Let them tick the files they actually need and grab those instead.

📁

Direct-to-Folder

On Chromium desktops, extract the full payload straight into an OS folder via the native File System Access API — no unzip utility needed.

🛡️

Graceful Fallback

Device-aware tiers: direct extraction, OPFS preview, or a plain download fallback. Every visitor gets the best experience their browser allows.

🔓

Open Source

Built with transparency and privacy in mind. Fully open source (MIT) and free to use in personal and commercial projects.

🤖 Building with an AI coding agent?

Point your vibe coder at AGENTS.md — a knowledge file that teaches any coding agent how to use ZipLayer: install, API reference, and browser support.

Read AGENTS.md →

Usage Example

<!-- Drop-in the ZipLayer wizard -->
<zip-layer-modal src="https://portal.com/api/export.zip"></zip-layer-modal>

<!-- Or use the headless API -->
<script type="module">
  import { ZipLayer } from "ziplayer";
  const archive = await ZipLayer.xray('https://portal.com/api/export.zip');
  const tree = archive.getFileTree();
  const file = await archive.extractFile(tree[0].path);
</script>

Frequently Asked Questions

What is ZipLayer?

ZipLayer is a free, open-source (MIT) browser library that replaces the plain "download this zip" experience with a wizard modal. It streams the archive into the browser, previews its contents (PDF, SVG, text), and lets users download exactly the files they need — all in one line of code, with no backend or unzip utility required.

How do I install ZipLayer?

Add one tag to your page: <zip-layer-modal src="https://example.com/export.zip"></zip-layer-modal>, then load src/zip-layer-modal.js (or the package) as a module. That's it — no build step, no dependencies to configure.

Does ZipLayer need a backend or API key?

No. Everything runs 100% in the browser — ZipLayer fetches the zip, streams it through a Web Worker, and processes it locally with the vendored fflate engine. There is no server component and no API key.

Can users preview files before downloading?

Yes. After streaming, ZipLayer X-Rays the archive and shows the file tree. PDFs, SVGs, and text files can be previewed inline, so users can check what's inside before choosing to download selected files, extract to a folder, or grab the whole zip.

Does ZipLayer work on mobile?

Yes. ZipLayer degrades gracefully by device: direct-to-folder extraction on Chromium desktops, in-browser streaming preview everywhere else, with a plain-download fallback on older browsers.

Is ZipLayer free?

Yes. ZipLayer is MIT licensed and free for personal and commercial use. It collects no data and never will — see the privacy policy.