Semver Range Checker

Check whether a version satisfies an npm semver range like ^1.2.0.

Free semver range checker that tests whether a semantic version satisfies an npm-style range. Supports caret, tilde, wildcard, hyphen and comparator ranges with full node-semver rules, including pre-release handling. Runs entirely in your browser — no package registry is contacted. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Is anything sent to a server or npm?

No. The comparison runs entirely in your browser using a self-contained implementation. No package registry or network request is involved, so nothing you type is sent anywhere.

Semver range checker

Check whether a semantic version satisfies an npm-style range — instantly and offline. It is for developers reasoning about a package.json dependency range, debugging why an unexpected version installed, or learning how caret and tilde actually behave.

How it works

The checker expands your range into a set of simple comparators following the node-semver rules, then tests the version against them:

  • Caret ^1.2.0 keeps the left-most non-zero field fixed → >=1.2.0 <2.0.0.
  • Tilde ~1.2 allows patch-level changes → >=1.2.0 <1.3.0.
  • Wildcards 1.x, 1.2.x, * expand to comparator pairs.
  • Hyphen ranges 1.2.3 - 2.3.4 become >=1.2.3 <=2.3.4.
  • Comparators >=1.0.0 <2.0.0 are used directly; space means AND.
  • OR sets are joined with ||; the version satisfies the range if it matches any one set.

Pre-release tags are ordered per the spec: numeric identifiers rank below alphanumeric, and a version with no pre-release outranks one with.

Expanded examples

VersionRangeSatisfies?Why
1.4.2^1.2.0yes1.4.2 is ≥ 1.2.0 and < 2.0.0
2.0.0^1.2.0no2.0.0 is not < 2.0.0
1.2.9~1.2yes1.2.9 is ≥ 1.2.0 and < 1.3.0
1.3.0~1.2no1.3.0 is not < 1.3.0
0.2.5^0.2.0yesLeft-most non-zero is minor; cap is 0.3.0
0.2.0^0.1.0no^0.1.0 expands to ≥0.1.0 <0.2.0
2.0.0-rc.1>=2.0.0noPre-release is less than the stable version

The 0.x special case

For versions starting with 0., caret (^) behaves more strictly because the major field is zero and cannot protect stability. The left-most non-zero field becomes the pin point:

  • ^0.1.0>=0.1.0 <0.2.0 (minor is pinned)
  • ^0.0.3>=0.0.3 <0.0.4 (patch is pinned)

This reflects the expectation that 0.x packages treat every minor version as potentially breaking.

Why pre-releases rarely satisfy ranges

2.0.0-rc.1 is semantically lower than 2.0.0. A range like >=1.0.0 <3.0.0 does not match 2.0.0-rc.1 unless the pre-release version is explicitly listed in the range. This prevents a ^1.0.0 declaration from accidentally installing a beta of the next major. To allow a specific pre-release, use >=2.0.0-rc.1 <2.0.0 or add it explicitly with an || clause.

Common debugging scenarios

“Why did npm install a version I didn’t expect?” Paste the version that installed and the range from package.json — the checker shows exactly which comparator set matched it.

“Is my peer dependency range too broad?” Test boundary versions like the highest patch of a previous major (e.g., 1.9.9) against your range to see whether it accidentally accepts them.

“Does my range include the new beta?” Test the pre-release tag explicitly — the expanded comparator output shows you precisely why it does or does not satisfy the range.

The result shows whether the version matches and the expanded comparator set used, so the verdict is always transparent. Everything runs in your browser — no package registry is ever contacted.