Skip to main content
QUIETLYTIC
Developer

SemVer Range Checker

Check whether a version satisfies a range like ^1.2.0 or ~2.0.0.

Local · nothing leaves this browser Waiting for a version and a range
Esc Clear
Esc Clear
Result

Enter a version and a range above.

How it works

A `package.json` dependency range (^1.2.0, ~2.0.0, >=1.0.0 <2.0.0) is a set of comparators, not a single version — checking whether a specific installed version satisfies it by eye means re-deriving npm's own range grammar in your head. This checks it against npm's actual range semantics.

Caret and tilde mean different things depending on the version

^1.2.3 allows anything up to (but not including) 2.0.0 — but ^0.2.3 only allows up to 0.3.0, because npm treats a 0.x version as not yet API-stable and caret ranges narrow accordingly. ~1.2.3 allows patch-level changes only, up to 1.3.0. Both are evaluated with the real rule for the major version you entered, not a fixed "one version up" assumption.

Example

1.4.2 against ^1.2.0 satisfies — same major version, at or above the minimum. Against ~1.2.0 it does not, because tilde only tolerates a patch bump within 1.2.x.

Frequently asked questions

Why does ^0.2.3 behave differently from ^1.2.3?

Because npm treats any 0.x version as not yet API-stable, so a caret range on a 0.x version only allows patch-level bumps — ^0.2.3 stops below 0.3.0, while ^1.2.3 allows anything below 2.0.0. Same symbol, a narrower promise, because the major version itself hasn't promised stability yet.

What is the difference between ^ and ~?

Tilde allows patch-level changes only within the stated minor version — ~1.2.3 permits up to but not including 1.3.0. Caret is more permissive: ^1.2.3 permits up to but not including 2.0.0, tracking the whole "does not break my code" promise semantic versioning makes about a major version.

Related tools

From the intelligence desk