Semver Calculator
Check versions against npm ranges like ^ and ~, compare and sort versions, and calculate the next version — exactly as npm does.
Runs in your browser: input and output are never sent to the server, and the platform does not store your input.
Output
Fill in the fields on the left, then run.
How to use
- 1Pick a mode: check a range, compare versions or calculate the next one.
- 2Enter the version; when checking a range you can paste several at once.
- 3The result explains what the range really means and which version matches best.
FAQ
What is the difference between ^ and ~?
^1.2.3 allows updates that keep the left-most non-zero digit (>=1.2.3 <2.0.0); ~1.2.3 only allows patch updates (>=1.2.3 <1.3.0). Note that ^0.2.3 stops at <0.3.0.
Why does 2.0.0-beta.1 not match ^1.0.0 or >=1.0.0?
npm does not let prereleases satisfy a range unless the range names a prerelease of the same version, so unstable versions are never installed by accident.
When do I bump major, minor or patch?
Major for incompatible API changes, minor for backwards-compatible features, patch for backwards-compatible fixes.
Do the results match npm?
Yes. The tool computes with the same semver package npm itself uses.
