Data / LOCAL TOOL

SemVer Comparator & Range Tester

Compare strict semantic versions and test them against npm-style ranges locally.

Runs locally — input is never uploaded
Versions & rangenode-semver · strict versions
ResultReady when you are

WHAT IT DOES

Check the range before the package manager resolves it.

Enter one or more strict semantic versions and an npm-style range such as ^2.4.0, ~1.8.3, or >=1 <3. Each version is normalized and tested with node-semver, the same rules used throughout the npm ecosystem. When exactly two versions are entered the result also states their precedence, including prerelease identifiers, without treating build metadata as an ordering signal.

Why use it?

Use it to check exactly which releases an npm-style dependency constraint admits, especially around major-zero and prerelease versions.

How to use this tool

  1. Enter the range and one complete version per line, or load the built-in example.
  2. Test ^2.4.0 against 2.4.0, 2.9.0, and 3.0.0: the first two satisfy it and 3.0.0 does not.
  3. Review prerelease handling and any explicit Include prerelease setting. A satisfying version is a range match, not a claim that the release is compatible or available in a registry.

Details and limitations

  • Versions must contain major, minor, and patch components so a shorthand range is never mistaken for a complete release identifier.
  • Ranges support comparator sets, hyphen ranges, tilde, caret, wildcards, logical OR, and prerelease comparators under node-semver semantics.
  • Prereleases remain excluded from ordinary ranges unless the range names a prerelease or the explicit Include prerelease option is enabled.
  • The normalized range and its lowest satisfiable version are shown beside the per-version verdicts.

WORKED EXAMPLES

A major-zero caret has a narrower boundary

Compare these complete versions against ^0.2.3 with Include prerelease off. Do not assume every caret range accepts the next minor version.

Versions

0.2.3
0.2.9
0.3.0
0.2.4-beta.1

Range

^0.2.3

Expected result

0.2.3 and 0.2.9 satisfy the range. 0.3.0 and the prerelease 0.2.4-beta.1 do not. These are npm-style range rules, not a compatibility test of the packages.

COMMON QUESTIONS

SemVer Range Tester questions

Does this use npm's SemVer range behavior?
Yes. The bundled node-semver library provides the parsing, range normalization, satisfaction checks, and precedence comparison.
Why does 2.5.0-beta.1 not satisfy >=2 <3?
SemVer ranges exclude prerelease versions unless a comparator explicitly opts into that prerelease line. Enable Include prerelease only when that matches the consuming tool's policy.
Does build metadata change which version is newer?
No. Semantic Versioning excludes the +build portion from precedence. Prerelease identifiers after a hyphen do affect ordering.