← All Tools

Semver Calculator

Parse, compare, and validate semantic versions. Check NPM range satisfaction and explore version increments. Everything runs locally in your browser.

Parse Version
Major
-
Minor
-
Patch
-
Pre-release
-
Build
-
Compare Versions
Enter two versions to compare
Range Checker
Result: Enter a version and range to check
Increment Calculator
Next Major
-
Next Minor
-
Next Patch
-
Next Pre-major
-
Next Pre-minor
-
Next Pre-patch
-
NPM Range Syntax Reference
SyntaxExampleDescription
^^1.2.3Compatible with version: >=1.2.3 <2.0.0. Allows changes that do not modify the left-most non-zero digit.
~~1.2.3Approximately equivalent: >=1.2.3 <1.3.0. Allows patch-level changes.
>=>=1.0.0Greater than or equal to the specified version.
<=<=2.0.0Less than or equal to the specified version.
>>1.0.0Strictly greater than the specified version.
<<2.0.0Strictly less than the specified version.
==1.2.3Exactly equal to the specified version.
-1.0.0 - 2.0.0Hyphen range: >=1.0.0 <=2.0.0 (inclusive on both sides).
||^1.0.0 || ^2.0.0Union: satisfies either range.
**Matches any version.
x1.x or 1.2.xWildcard: 1.x = >=1.0.0 <2.0.0, 1.2.x = >=1.2.0 <1.3.0

Common Range Examples

^1.2.3
>=1.2.3 <2.0.0
Caret: minor + patch updates OK
^0.2.3
>=0.2.3 <0.3.0
Caret on 0.x: only patch updates
~1.2.3
>=1.2.3 <1.3.0
Tilde: only patch updates
~0.2.3
>=0.2.3 <0.3.0
Tilde on 0.x: only patch updates
>=1.0.0 <2.0.0
1.0.0 through 1.x.x
Explicit range with comparators
1.0.0 - 2.0.0
>=1.0.0 <=2.0.0
Hyphen range, inclusive
^1.0.0 || ^2.0.0
1.x.x or 2.x.x
Union of two caret ranges
*
>=0.0.0
Any version