Semver Calculator

Test semver ranges, sort versions, and bump a release number.

๐Ÿ”’ Client ยท Offline
Processed locally
This tool runs in the browser.

About semver

A range in a package.json file is a set of comparisons. This tool shows the comparisons, so you can read the limits of the range:

  • ^1.2.3 is >=1.2.3 <2.0.0. It holds the major number.
  • ~1.2.3 is >=1.2.3 <1.3.0. It holds the minor number.
  • 1.2.3 - 2.3.4 is >=1.2.3 <=2.3.4.
  • 1.x is >=1.0.0 <2.0.0.

A prerelease version such as 1.5.0-rc.1 does not satisfy ^1.0.0. Use the include prerelease option to accept it.

The prerelease bump adds one to the last number of the tag, so 1.2.3-beta.1 becomes 1.2.3-beta.2. A prerelease bump of a release version also increases the patch number, so 1.2.3 with the identifier beta becomes 1.2.4-beta.0.

The compatibility matrix tests every version against every range. Use it to select one range that accepts all the versions that you support.