# node-tar: 7.2 out of 10

A strong pick. 2nd of 9 in [Zip and compression](https://elestia.ai/opensource/compression/index.md).

node-tar (npm package `tar`) is the standard full-featured tar library for Node.js, and npm itself uses it. For tar.gz work on Node it is still the default pick, but you need to upgrade it quickly, because 2026 brought a steady run of extraction advisories.

**Best for:** Node.js projects that need to create, list or extract tar and tar.gz/tar.zst archives on disk with a high-level API.

## Scores

- **Overall: 7.2** (likely 6.2 to 8.3)
  - Claude Opus 5.5 (7.0): For tar archives on Node.js it is the default, best-featured choice, and npm itself trusts it. That makes it a strong pick for that named need, even though it does nothing for zip or browser use. Its many 2026 advisories and its reliance on one maintainer keep it below the top. Anyone extracting untrusted archives must stay on the newest 7.5.x.
  - GPT-6.2 Sol (7.4): Choose node-tar when a new Node.js project needs to create, inspect, and extract tarballs. Archiver covers both ZIP and TAR generation, and fflate fits ZIP and general compression across runtimes. Active npm releases support the recommendation, while the reported packing hang, recurring extraction advisories, and below-baseline growth keep it below the top tier.
- **Needed by many: 4.1** (likely 3.1 to 5.2)
  - Claude Opus 5.5 (4.0): Few application developers need to handle tar archives directly. It is mostly a job for tooling, CLIs, deploy scripts and package managers. It covers only the tar side of the category, with no zip support, and it runs only on Node.js. That makes it a clear niche within a category that is itself moderately broad.
  - GPT-6.2 Sol (4.2): Compression and archives serve many JavaScript projects, but node-tar serves the narrower job of handling tarballs in Node.js. That covers package tooling, build artifacts, and backups. The Stack Overflow survey establishes Node.js use, while demand for tar handling within that audience is less clear.
- **Helps a lot: 7.4** (likely 6.4 to 8.4)
  - Claude Opus 5.5 (7.0): It is the most complete tar implementation in JS. It creates, extracts, lists, replaces and updates archives, compresses with gzip, brotli and zstd, and v7 is TypeScript with good types. The 2026 advisories show real correctness gaps in how it parses hostile archives. Third-party benchmarks also show it slower than tar-fs for plain pack and extract.
  - GPT-6.2 Sol (7.8): Version 7.5.23 provides a full tar API with streams, file-based promises, bundled types, and concrete examples. A user still reports an async packing hang on some hardlinked files, and the documented extraction transform has a type mismatch. An older benchmark from the Remix team found similar parsing speed to tar-stream on one fixture, so current performance across workloads remains uncertain.
- **Holds up over time: 7.0** (likely 5.9 to 8.1)
  - Claude Opus 5.5 (7.0): It had 21 npm versions and 57 commits in the past year, and advisories were patched within days, so the project is clearly alive. Because npm depends on it, the ecosystem has a strong reason to keep it maintained. Most of the work and the releases rest on one maintainer, and the Scorecard's Maintained check scores low (1). The GitHub releases page has not been updated since 2022, but npm releases are current.
  - GPT-6.2 Sol (7.0): The project logged 57 commits and published 21 npm versions in a year, despite the stale GitHub Releases page. The v7 upgrade changed file-permission defaults, and a later patch introduced a reported type regression. One listed npm maintainer and limited evidence of long-term funding make the two-year outlook less certain.
- **Used widely: 7.4** (likely 6.2 to 8.5)
  - Claude Opus 5.5 (7.0): It gets 475M downloads in 4 weeks and has 3.18M dependent repos, the most in the category, but most of that comes through npm, node-gyp and other tools that install it. Its download ratio of 2.4 is well below the 4.1 median and below every peer, so its share is shrinking. Direct choices still likely number in the tens of thousands of projects or more.
  - GPT-6.2 Sol (7.8): Ecosyste.ms found 3.18 million dependent repositories and 5,040 dependent packages, the largest repository footprint in this peer set. Four-week downloads rose from 197 million to 475 million, but the 2.4× ratio trails both the catalog's 4.1× baseline and every listed peer. Automated and transitive installs make it hard to estimate how many new projects choose node-tar directly.
- **Vouched for: 7.3** (likely 5.7 to 8.3)
  - Claude Opus 5.5 (7.0): The npm CLI and much of the Node toolchain run it in production, which is strong validation from people with a lot to lose. Security researchers have audited it closely, and it is widely described as the main JS tar library. It has no survey or Hacker News presence and few independent write-ups beyond the advisories.
  - GPT-6.2 Sol (7.6): npm's pacote uses node-tar to extract packages, and node-gyp uses it to install Node.js headers. Those are demanding uses, although both come from the Node.js tooling ecosystem. The Remix team supplies an independent benchmark, but it covers one tarball and predates the current release.
- **Safe: 5.4** (likely 4.3 to 6.5)
  - Claude Opus 5.5 (5.0): It has had 21 advisories in total and 13 in the last 24 months. They include several high-severity hardlink and symlink path traversals in early 2026 and a batch of DoS issues in July 2026, all patched in 7.5.x releases. The fixes came quickly, but the steady stream shows the extraction code is a real attack surface. Scorecard is 5.2, with no code review, fuzzing or SAST. It has 5 dependencies and the BlueOak-1.0.0 licence, which is permissive.
  - GPT-6.2 Sol (5.8): All five recent advisories in the bundle are patched in 7.5.23, with fixes available by public disclosure. The package has five direct dependencies, a permissive BlueOak-1.0.0 license, and a staged npm release workflow with two-factor approval. The 13 advisories in two years and the 5.2 OpenSSF Scorecard, including zero scores for code review and fuzzing, leave real concerns for untrusted extraction. Risk varies with the archive source and the limits enforced by the application.

## Good

- A complete tar implementation that handles PAX, GNU long names, links, permissions and gzip/brotli/zstd, with both streaming and sync APIs.
- Rewritten in TypeScript in v7, with bundled types and dual ESM/CJS exports.
- Proven at very large scale as the archive engine inside the npm CLI.
- Actively maintained, with 21 releases and 57 commits in the last year and quick security patches.

## Bad

- It handles tar only. It cannot make or open zip files, and it runs on Node.js only, not in browsers.
- 13 advisories in 24 months, mostly path traversal through hardlinks and symlinks and DoS on crafted archives, so extracting untrusted archives needs pinned, current versions.
- One maintainer does most of the work and the releases, and the Scorecard is weak on code review, fuzzing and SAST.
- Old benchmarks show tar-fs/tar-stream running much faster for simple pack and extract jobs.

## The numbers

- Downloads, 4 weeks: 475M
- In a year: ×2.4
- GitHub stars: 925
- Commits, 12 months: 57
- Last npm release: Nov 2026
- Advisories, 24 months: 13
- Licence: BlueOak-1.0.0
- GitHub: https://github.com/isaacs/node-tar
- npm: https://www.npmjs.com/package/tar

Many packages install it, so most downloads are not a direct choice.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
