Semver Comparator & Range Calculator

Parse SemVer 2.0.0 versions, compare two with the full operator set, and match them against npm-style ranges — caret (^1.2.3), tilde (~1.2.3), hyphen (1.2.3 - 2.0.0), x-ranges, OR sets, and the six comparators. Includes a bulk max-satisfying finder and a version bumper. Pure client-side, no upload.

Parse a version

Strict SemVer 2.0.0 — rejects leading zeros, empty parts, missing core, and other spec violations.

Compare two versions

Precedence per the spec — a non-pre-release outranks a pre-release at the same M.m.p; build metadata is ignored.

Match a version against a range

npm-style: caret, tilde, hyphen, x-ranges, OR, and the six comparators. The range is parsed and pretty-printed back so you can see what it actually means.

Range presets

Find the highest version that satisfies a range

Paste one version per line, set a range, see every match and the highest-precedence one. Invalid lines are flagged inline. Blank lines and # comments are ignored.

Bump a version

npm-compatible bumps. The pre-release id defaults to rc.

Range syntax cheatsheet
SyntaxMeaningExample
1.2.3exact1.2.3 matches only 1.2.3
>1.2.3 etc.comparator>=1.0.0 <2.0.0
^1.2.3compatible (per npm)^1.2.3>=1.2.3 <2.0.0
~1.2.3patch-level (per npm)~1.2.3>=1.2.3 <1.3.0
1.x / 1.2.xx-range1.x>=1.0.0 <2.0.0
1.2.3 - 2.0.0hyphen range>=1.2.3 <=2.0.0
A || BOR^1.0.0 || ^2.0.0
*anymatches every version

Pure client-side, works offline once loaded, no upload, no tracking. Built on the SemVer 2.0.0 spec and the npm range grammar.