Semver Checker & Range Tester
Test which versions match a range like ^1.2.3 or ~2.0, compare versions and choose the next release number.
Runs in your browser. Nothing is uploaded.
Does a version match a range?
Compare two versions
What is the next version?
How to use the Semver Checker & Range Tester
- Type a version range as you would write it in package.json, such as
^1.2.3,~2.0,>=1.0.0 <2or1.x. - List the versions you want to test, one per line. Each one is marked as matching or not, and the highest match is shown.
- Read the plain-English meaning of the range and its expanded form, for example “at least 1.2.3 and below 2.0.0”.
- Use Compare two versions to see which is newer, and What is the next version? to bump a version for a release.
Semantic versioning in one line
A semantic version has three numbers, MAJOR.MINOR.PATCH. Raise the patch for bug fixes, the minor
for new features that don’t break anything, and the major when existing users may need to change
their code. Optional extras come after: -beta.2 marks a pre-release and +build.77 adds build
information that doesn’t affect ordering.
Test a range
Package managers such as npm, Yarn, pnpm and Composer let you say which versions of a dependency are
acceptable. Ranges like ^1.2.3 are compact but easy to misread. Type one and the tool shows:
- What it means in words, such as “at least 1.2.3 and below 2.0.0”.
- The expanded form, using only
>=,<and friends. - Which of your versions match, with the highest match, which is the one a fresh install would choose from that list.
All the usual forms work: caret and tilde, x-ranges like 1.x and 1.2.*, hyphen ranges like
1.0.0 - 1.5, comparisons, and several alternatives joined with ||.
Compare versions correctly
Version strings don’t sort as text: 1.10.0 is newer than 1.9.0, and 1.0.0-rc.1 comes before
1.0.0. The comparison box tells you which version is newer and whether the step between them is a
major, minor, patch or pre-release change.
Version zero is different
Versions below 1.0.0 follow a stricter rule: the project is still settling, so any minor release may
break things. That is why ^0.4.2 stops below 0.5.0 instead of 1.0.0. Test such ranges here before
relying on automatic updates.
Choose your next version
Enter the current version and the tool lists every possible next release: patch, minor and major,
plus pre-releases with your own tag such as beta or rc. It also breaks the current version into
its parts and suggests a fix for near-misses like v1.2.
Runs locally
The checks use the same semver library as npm, bundled into the page. Nothing is sent to a server or to the npm registry. To review a whole dependency list, paste your file into the package.json Viewer.
Frequently asked questions
What is the difference between ^ and ~?
A caret (^1.2.3) allows anything that doesn’t change the first non-zero number, so 1.x updates but not 2.0.0. A tilde (~1.2.3) allows only patch updates, 1.2.x. The tool spells out both in plain English.
Why does ^0.2.3 not allow 0.3.0?
Before 1.0.0, semver treats every minor version as possibly breaking. So the caret keeps the first non-zero number fixed: ^0.2.3 means at least 0.2.3 and below 0.3.0, and ^0.0.3 allows only 0.0.3.
Why don’t pre-releases like 2.0.0-beta.1 match my range?
npm only matches a pre-release if the range itself mentions a pre-release of the same version, so ^1.2.3 never pulls in 1.5.0-rc.1 by accident. Tick Include pre-releases to match them anyway, like npm’s --include-prerelease.
Is 1.0.0-beta older than 1.0.0?
Yes. A pre-release comes before the normal version with the same numbers. Pre-releases compare part by part: numbers numerically, words alphabetically, so alpha < alpha.1 < beta < beta.2 < rc.1.
Does this follow npm’s rules exactly?
Yes. It uses the same semver library as npm, running in your browser. Nothing is fetched from the npm registry, so list the versions you want to check yourself.
Tutorials
How to choose the next version number for a release
Decide between a patch, minor or major release, create beta and release-candidate versions, and check their order.
How to read ^ and ~ version ranges in package.json
Learn what caret and tilde ranges allow, test them against real versions, and see why ^0.x behaves differently.