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
| Syntax | Example | Description |
|---|---|---|
| ^ | ^1.2.3 | Compatible with version: >=1.2.3 <2.0.0. Allows changes that do not modify the left-most non-zero digit. |
| ~ | ~1.2.3 | Approximately equivalent: >=1.2.3 <1.3.0. Allows patch-level changes. |
| >= | >=1.0.0 | Greater than or equal to the specified version. |
| <= | <=2.0.0 | Less than or equal to the specified version. |
| > | >1.0.0 | Strictly greater than the specified version. |
| < | <2.0.0 | Strictly less than the specified version. |
| = | =1.2.3 | Exactly equal to the specified version. |
| - | 1.0.0 - 2.0.0 | Hyphen range: >=1.0.0 <=2.0.0 (inclusive on both sides). |
| || | ^1.0.0 || ^2.0.0 | Union: satisfies either range. |
| * | * | Matches any version. |
| x | 1.x or 1.2.x | Wildcard: 1.x = >=1.0.0 <2.0.0, 1.2.x = >=1.2.0 <1.3.0 |
Common Range Examples
^1.2.3
Caret: minor + patch updates OK
^0.2.3
Caret on 0.x: only patch updates
~1.2.3
Tilde: only patch updates
~0.2.3
Tilde on 0.x: only patch updates
>=1.0.0 <2.0.0
Explicit range with comparators
1.0.0 - 2.0.0
Hyphen range, inclusive
^1.0.0 || ^2.0.0
Union of two caret ranges
*
Any version