Semver calculator

Work out the next semantic version from Conventional Commits or by bump type, including pre-releases, and test whether a version satisfies an npm-style range. Runs in your browser.

Free · Runs in your browser

Next version

beta, rc, alpha… Leave empty for numbers only, like 1.4.3-0.
Conventional Commits, one per line. The matching bump is highlighted.
majorBreaking change2.0.0
minorNew feature1.5.0
patchBug fix1.4.3
premajorPre-release of the next major2.0.0-beta.0
preminorPre-release of the next minor1.5.0-beta.0
prepatchPre-release of the next patch1.4.3-beta.0
prereleaseNext pre-release1.4.3-beta.0

Does a version match a range?

^1.2.0, ~1.2, >=1.0.0 <2, 1.x || 2.x, 1.2.3 - 2.3
1.8.0 matches^1.2.0 means >=1.2.0 <2.0.0-0

How to use it

01

Enter your version

The current release, like 1.4.2 or 2.0.0-rc.1.

02

See every next version

Major, minor, patch and pre-releases, with the same rules as npm's semver package.

03

Test a range

Check whether a version satisfies ^, ~, x-ranges, hyphen ranges or || combinations.

Semantic versioning in one paragraph

A version is MAJOR.MINOR.PATCH. Increase MAJOR for incompatible API changes, MINOR for backwards-compatible features, and PATCH for backwards-compatible fixes. A pre-release like 2.0.0-rc.1 sorts before 2.0.0. Versions below 1.0.0 are for initial development, when anything may change.

Reading npm ranges

  • ^1.2.3 allows changes that don't modify the left-most non-zero number: >=1.2.3 <2.0.0. But ^0.2.3 means >=0.2.3 <0.3.0.
  • ~1.2.3 allows patch changes: >=1.2.3 <1.3.0.
  • 1.x, 1.2 - 2.3 and ^1 || ^2 work too.
  • Pre-releases only match ranges that mention a pre-release of the same version, so a new beta doesn't slip into ^1.2.0.

Let commits pick the number

With Conventional Commits, the next version follows from the commits: any breaking change is major, any feat is minor, otherwise a fix is a patch. Paste your commits above and the calculator highlights the right bump. Then write the entry with the Keep a Changelog generator.

DevRelay does this for every release. When a release ships, DevRelay drafts the changelog, posts and docs updates for it, grounded in the actual diff, ready for your approval. Start free.
FAQ

Questions about this tool.

01What's the next version after 1.0.0-rc.1 for a major bump?

1.0.0. Bumping a pre-release to the release it was leading up to drops the pre-release label, as npm version does.

02Should breaking changes bump the major in 0.x?

The spec says anything may change in 0.x. Many projects bump the minor for breaking changes before 1.0; the calculator lets you choose.

03Does build metadata (+build.5) affect order?

No. Build metadata is ignored when comparing versions.

04Is my input sent anywhere?

No. Everything runs in your browser.

Or let every release announce itself.

When a release ships, DevRelay drafts the changelog, posts and docs updates for it, grounded in the actual diff, ready for your approval.

No credit card · Nothing posts without your approval