Skip to main content

Package Lock Analyzer

Paste your package-lock.json to get a full dependency breakdown: total packages, direct vs transitive split, duplicate versions, estimated bundle size, and license distribution. Supports lockfile v1, v2, and v3.

✓ 60K+ developers trust DevPlaybook ✓ Runs 100% in your browser ✓ Lockfile v1 / v2 / v3

Frequently Asked Questions

What information does this tool show from package-lock.json?▼

The analyzer shows: total package count (direct + transitive), dev-only dependency count, duplicate packages (same package with multiple versions), an estimated bundle size for production dependencies, and a license breakdown across all packages.

What are transitive dependencies?▼

Transitive (indirect) dependencies are packages that your direct dependencies depend on — not listed in your package.json but required for them to work. For example, if you install React, it transitively depends on scheduler and js-tokens. These are often the majority of packages in node_modules.

Why do I have duplicate packages?▼

Duplicate packages (same package, different versions) appear when two of your dependencies require incompatible versions of the same package. npm installs both versions in separate locations in node_modules. This increases bundle size. Tools like npm dedupe can sometimes flatten these.

What does lockfileVersion mean?▼

lockfileVersion indicates the format of your package-lock.json. Version 1 is from npm 5/6. Version 2 is from npm 7 (adds backwards-compatible packages field). Version 3 is the current format (npm 7+ with packages only). This tool supports v1, v2, and v3.

Should I commit package-lock.json?▼

Yes — always commit package-lock.json for applications. It ensures every developer and CI run gets exactly the same package versions, preventing 'works on my machine' issues. For libraries (npm packages you publish), you typically omit package-lock.json from the published artifact but still commit it to your repo.

How can I reduce my dependency count?▼

Audit large transitive deps with 'npm ls'. Remove unused packages with 'npx depcheck'. Consider replacing heavy packages (moment → date-fns, lodash → native methods). Use 'npm dedupe' to flatten duplicates. Tools like bundlephobia.com show the size cost of each package.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →