Productivity and Utilities

Semver Range Tester

Enter a version range and a list of versions to see which versions satisfy the range.

Your numbers

Comparators such as >=1.2.3 <2.0.0, caret ^1.2.3, tilde ~1.2.3, x-ranges like 1.x or 1.2.*, hyphen ranges like 1.2.3 - 2.3.4, and || for alternatives.

One version per line, or separated by spaces or commas. Up to 300.

Result

Versions that match

2 of 8

The highest match is 1.9.0.

Range as comparators
>=1.2.3 <2.0.0-0
Highest matching version
1.9.0
Lowest matching version
1.2.3
Matches
2
Not matching
6
Not valid versions
0

Each version

VersionResult
0.9.9Does not match
1.0.0Does not match
1.2.3Matches
1.2.4-beta.1Does not match
1.9.0Matches
2.0.0Does not match
2.0.0-rc.1Does not match
3.1.4Does not match
How this was calculated
  1. The range is rewritten as plain comparators. Caret ^1.2.3 becomes >=1.2.3 <2.0.0-0, tilde ~1.2.3 becomes >=1.2.3 <1.3.0-0, and 1.2.x becomes >=1.2.0 <1.3.0-0.
  2. A version must satisfy every comparator in at least one alternative separated by ||.
  3. Versions are compared by major, minor and patch as numbers. A version with a prerelease tag is lower than the same version without it, and prerelease identifiers are compared one by one.
  4. A prerelease version matches only when a comparator in the same alternative names a prerelease of the same major, minor and patch.
  • This follows the range rules used by npm. Other tools, such as Cargo, Composer or Python packaging, treat some of these symbols differently.

Calculated using SumPanda.com · https://sumpanda.com/semver-range-tester/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the semver range tester

  1. Enter a version range, such as ^1.2.3 or >=1.0.0 <2.0.0.
  2. Enter a list of versions to test, one per line or separated by spaces or commas.
  3. Tick Let prerelease versions match any range if you want versions such as 2.0.0-rc.1 to count.
  4. Read which versions match, the highest and lowest match and the range rewritten as plain comparators.

Formula

^1.2.3 means >=1.2.3 <2.0.0-0

~1.2.3 means >=1.2.3 <1.3.0-0

1.2.x means >=1.2.0 <1.3.0-0

1.2.3 - 2.3.4 means >=1.2.3 <=2.3.4

a || b matches a version that satisfies a or b

Versions compare by major, minor and patch as numbers. A prerelease sorts below its release, and its identifiers are compared one by one. The -0 on an upper bound keeps prereleases of that version out.

Which of eight versions fit a caret range

The versions 0.9.9, 1.0.0, 1.2.3, 1.2.4-beta.1, 1.9.0, 2.0.0, 2.0.0-rc.1 and 3.1.4 are tested against ^1.2.3, which is >=1.2.3 <2.0.0-0. Only 1.2.3 and 1.9.0 match, so the answer is 2 of 8, with 1.9.0 the highest. The prerelease 1.2.4-beta.1 is left out, because the range names no prerelease of 1.2.4.

The tilde range ~1.2.3 matches only 1.2.3. The range >=1.0.0 <1.5.0 || >=2.0.0 matches 1.0.0, 1.2.3, 2.0.0 and 3.1.4. With the prerelease box ticked and the range ^1.2.3-beta.0, the version 1.2.4-beta.1 matches as well, giving 3 of 8.

Caret, tilde and x-ranges

A caret allows changes that keep the left-most non-zero part the same: ^1.2.3 allows any 1.x.y from 1.2.3, ^0.2.3 allows 0.2.x from 0.2.3, and ^0.0.3 allows only 0.0.3. A tilde allows patch changes only when a minor version is given, so ~1.2.3 stays within 1.2.x. An x or star stands for any number, so 1.x means any 1.y.z.

These rules explain why a package that says ^1.2.3 can quietly move to 1.9.0 when you install, but never to 2.0.0.

Prereleases and other tools

By default, a prerelease version satisfies a range only if some comparator in the same alternative names a prerelease of the same major, minor and patch. That keeps unstable builds out of normal installs. The checkbox switches that rule off. To compare two exact versions, or sort a list, use the Semantic Version Comparator. To check the file where a range is written, use the JSON Formatter and Validator.

Assumptions and limits

  • The syntax is the one npm uses. Other package managers differ in small ways.
  • Versions need all three numbers, such as 1.2.0. A short form like 2.0 is reported as not valid.
  • Build metadata after a plus sign is ignored when comparing.
  • At most 300 versions are tested at a time.
  • The range and versions shown when the page opens are examples.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What does the -0 at the end of an upper bound mean?

It is the lowest possible prerelease. Writing <2.0.0-0 excludes 2.0.0 and every prerelease of 2.0.0, such as 2.0.0-beta, while allowing everything below.

Why does 1.2.4-beta.1 not match ^1.2.3?

Prerelease versions are left out unless the range names a prerelease of the same version. Tick the prerelease box to include them.

How do I match any version?

Use a star or the letter x. Both mean any version, and the page shows them as a star. Prereleases are still left out unless you tick the box.

Does the page check that a version exists in a registry?

No. It only compares the text you enter with the range. It never contacts a registry or sends your versions anywhere.