Lockfile Diff Analyzer
Compare two lockfiles and review version changes, downgrades and surprising jumps.
Before
After
Version changes
No diff yet
Paste a before and after lockfile, or load the npm example.
Examples
Major bump
react 18.2.0 → 19.0.0changed (major), flagged reviewA major bump may contain breaking changes and deserves a changelog check.
Patch bump
lodash 4.17.20 → 4.17.21changed (patch), no flagPatch releases are the routine case.
Version rollback
foo 2.0.0 → 1.0.0changed (downgrade), flagged reviewDowngrades often indicate an accidental revert or a forced resolution.
About this tool
Lockfile Diff Analyzer answers a narrow but frequent review question: what exactly changed between these two dependency lockfiles? Paste a before and after snapshot to get a sorted table of added, removed and version-changed packages, with semantic-version change classes attached to each row.
The parser recognises package-lock.json (both the modern packages map and legacy dependencies), Yarn v1 lock headers with nested version fields, pnpm-lock.yaml package keys and a plain name@version list. Format detection is automatic, and parser notes explain entries it could not read instead of hiding them.
Version changes are classified as major, minor, patch, prerelease or downgrade using a small semver comparison. Major bumps, downgrades, unparseable ranges and 'latest' targets are marked for review, because these are the changes most likely to need a migration check or a closer look at the changelog. Packages that did not change are omitted.
Use the filter chips to focus on additions, removals, changed versions or review flags, then copy the diff as Markdown for a pull request or download it as CSV. The comparison is entirely client-side — lockfiles often reveal internal registry URLs and package names, so they are never uploaded.
What this tool does not do
- Only npm, Yarn v1, pnpm-style and simple name@version snapshots are parsed; other formats need conversion.
- Transitive dependencies are identified by package name only; nested copies with different versions are not fully distinguished.
- Version classification uses numeric semver; non-semver ranges such as git SHAs are marked unknown.
- No registry lookups, advisory checks or changelog retrieval are performed.
- Lockfile contents are kept in memory for the session and are not saved between reloads.
How to use this tool
Paste two snapshots
Put the old lockfile in Before and the new one in After. Example chips load an npm major-bump pair, a Yarn pair and an invalid JSON case.
Check detected formats
Each input panel shows the detected format and package count. Parser notes appear above the results when entries were skipped.
Review the diff
Rows are sorted by package name. Version changes carry a bump class; risky ones carry a 'review' badge.
Filter the noise
Use All, Added, Removed, Changed or Review to focus the table on the changes that matter to your review.
Export the result
Copy the Markdown diff into a PR description or download the CSV for a spreadsheet or audit record.
Use cases
Dependency upgrade PRs
Summarise what a renovate/dependabot PR actually changed before approving it.
Release audits
Attach a readable dependency diff to a release note or internal changelog.
Debugging installs
Spot a surprising downgrade or a 'latest' target that makes installs irreproducible.
Cross-tool migrations
Compare a Yarn lock before migration with the npm lockfile generated afterwards.
Recognised lockfile shapes
| Format | Example |
|---|---|
| npm (modern) | "node_modules/react": { "version": "18.2.0" } |
| npm (legacy) | "dependencies": { "react": { "version": "18.2.0" } } |
| Yarn v1 | "foo@^1.0.0":\n version "1.2.3" |
| pnpm | /foo/1.2.3: |
| Generic | foo@1.2.3 per line |
npm filenames are auto-detected by JSON structure; you can still paste any supported shape into either panel.
Common mistakes
Mistake:Expecting a security advisory scan.
Fix:This tool compares versions only; it does not query vulnerability databases or semver dist-tags.
Mistake:Assuming 'latest' is a normal version.
Fix:It is flagged for review because it makes installs non-reproducible.
Mistake:Treating added/removed packages as review flags.
Fix:Only version changes are classified; additions and removals are listed without a risk badge.
Mistake:Comparing a manifest to a lockfile.
Fix:Paste two lockfiles. A package.json contains ranges rather than resolved versions.
Mistake:Expecting merged duplicates.
Fix:If the same package name appears twice with different versions, the first version is kept and a parser note is shown.
Frequently asked questions
Which lockfile formats are supported?
package-lock.json (modern packages map and legacy dependencies), Yarn v1 yarn.lock, pnpm-lock.yaml package keys, and a plain list of name@version lines. Format detection is automatic based on JSON structure and characteristic line patterns.
What does the review badge mean?
It marks a version change that deserves a second look: a major bump, a downgrade, an unparseable version or a target such as 'latest'. Added and removed packages are listed but are not automatically flagged as risky.
How are bump classes determined?
Versions are parsed as numeric semver (an optional leading v is accepted). Changes in the major, minor or patch component are labelled accordingly; a component that stays the same but gains or changes a prerelease suffix is labelled prerelease; a lower version tuple is a downgrade.
Does this check for vulnerable packages?
No. The analyzer is offline and never contacts a registry or advisory database. It compares resolved versions between two snapshots; use a dedicated vulnerability scanner for security checks.
Why do some packages appear only on one side?
Those are additions (only in After) or removals (only in Before). Packages whose version is identical in both snapshots are omitted so the table stays focused on real changes.
Are my lockfiles uploaded anywhere?
No. Both snapshots are parsed in your browser tab, and neither the contents nor the diff leave the page. Nothing is persisted; reloading starts with empty inputs.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.