Description
ASAR is an archive format from Electron. It is a simple, tar-like format that concatenates files together without compression, but it supports random access, and it stores file information as JSON, which makes it easy to write a parser. The @electron/asar package provides a command-line tool and a programmatic API, and the CLI requires Node 22.12.0 or later. When packing, you can exclude resources, and a transform option lets you pass a stream transform, for example to compress files that go into the archive. Files with identical contents are stored once and shared, so archives with duplicated content, such as bundled node_modules, are smaller and pack faster. Unpacked files are always written out in full. The README includes a section on the format, explaining the header, the offsets and the sizes, and it links the API documentation for full usage. It notes that the programmatic example currently has no error handling. The project is on GitHub under the electron organisation.…
Highlights
- Random-access archive format for Electron apps
- Stores duplicated files once
- Command-line tool and programmatic API
- Transform option for compression
Ratings & Reviews
No ratings yet
Be the first to rate Asar.
People also visit

baoyu-electron-extract
Extracts resources and JavaScript from any installed Electron app
Asar FAQ
What is ASAR?
An Electron archive format that concatenates files without compression, with random access and a JSON header.
Does it compress files?
Not by default. The transform option lets you pass a stream transform, for example to compress files.
What Node version do I need?
Node 22.12.0 or later for the CLI.
Are duplicate files stored twice?
No. Files with identical contents are stored once, and other entries point at the same offset.
Are unpacked files affected by deduplication?
No. Unpacked files are always written out in full.
Does the programmatic example handle errors?
The README says there is currently no error handling in that example.
What are the best Asar alternatives?
Popular alternatives to Asar include Arcula, Packager and Get. See all Asar alternatives
