SemVer Calculator – Bump, Compare & Check Ranges
NOUVEAUSemVer calculator to parse versions, bump major/minor/patch/prerelease, compare precedence and test npm ranges like ^, ~ and ||, with the rule explained.
Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.
Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.
Parse & bump
- Major
- 1
- Minor
- 4
- Patch
- 2
- Pre-release
- beta.1
- Build
- build.7
| major | 2.0.0 | MAJOR+1, minor and patch reset. A x.0.0 pre-release just drops its tag. | |
|---|---|---|---|
| minor | 1.5.0 | MINOR+1, patch reset. A x.y.0 pre-release just drops its tag. | |
| patch | 1.4.2 | PATCH+1. A pre-release just drops its tag. | |
| premajor | 2.0.0-beta.0 | Next major with a pre-release counter. | |
| preminor | 1.5.0-beta.0 | Next minor with a pre-release counter. | |
| prepatch | 1.4.3-beta.0 | Next patch with a pre-release counter. | |
| prerelease | 1.4.2-beta.2 | Increments the last numeric pre-release identifier, or starts one on the next patch. |
Compare two versions
1.0.0-alpha.1 < 1.0.0-alpha.beta
Pre-release identifier #2: "1" < "beta" — a numeric identifier ranks lower than an alphanumeric one.
Check a range
^1.2.3 → >=1.2.3 <2.0.0-0 (caret keeps the major version fixed)
✓ >=1.2.3✓ <2.0.0-0
Set 1: matches
>=2.0.0; <2.5.0
✗ >=2.0.0✓ <2.5.0
Set 2: no match
Exemples rapides
Des entrées typiques et les résultats produits par cet outil.
Présentation
This SemVer calculator answers the everyday versioning questions: what is the next version, which of two versions is newer, and does a version match a dependency range. It follows Semantic Versioning 2.0.0 for parsing and precedence, and npm's rules for bumps and ranges.
Bumps use the same logic as npm version, including pre-release counters such as 1.4.3-beta.0. Comparison explains the deciding rule, for example that beta.2 sorts before beta.11 because numeric identifiers compare as numbers. Range checks expand caret, tilde, x-ranges, hyphen ranges and || into plain comparators and show which one passed or failed.
All calculations run in your browser.
Pourquoi utiliser cet outil ?
- Know the next version before tagging
- Understand why ^0.2.3 rejects 0.3.0
- Correct pre-release precedence
- Each rule explained, not just a yes/no
Fonctionnalités
Strict parser
Validates SemVer 2.0.0 including pre-release and build metadata.
All bump types
major, minor, patch, premajor, preminor, prepatch and prerelease with an identifier.
Precedence compare
Compares two versions and names the rule that decided it.
npm ranges
Supports ^, ~, x/*, comparators, hyphen ranges and || sets.
Pre-release rule
Applies npm's rule that pre-releases only match ranges on the same x.y.z.
Copy results
Copy any bumped version with one click.
Mode d'emploi
Enter a version
Type it in "Version"; the parts and all bumps appear at once.
Set a pre-release id
Optionally type alpha, beta or rc in "Pre-release id" for pre-bumps.
Compare
Fill Version A and Version B to see which ranks higher and why.
Check a range
Enter a version and an npm range to see the expanded comparators.