Major, minor, patch, pre-release and build parts, with rule-by-rule errors
SemVer Calculator
Answer version questions quickly: which is newer, what comes next, and does this version satisfy that range.
Loading tool…
How to use semver calculator
Pick Compare, Bump, Range or Sort.
Compare two versions to see which ranks higher and the rule that decided it.
Bump a version to see every next version at once, including pre-releases with your own name.
Test a range like ^1.2.3 against a list of versions, or sort a list from oldest to newest.
What this tool does
- Applies SemVer 2.0.0 precedence exactly, including numeric versus text pre-release identifiers and ignored build metadata.
- Bumps the way npm version does, so 1.2.3-alpha patches to 1.2.3 and 2.0.0-rc.1 majors to 2.0.0.
- Understands caret, tilde, x-ranges, hyphen ranges, comparators and || alternatives, and shows what a range expands to.
- Follows npm's pre-release rule, with a switch for --include-prerelease.
How the result is verified
Sorting is checked pair by pair after it runs, and each bump is compared with the original to confirm it ranks higher.
Frequently asked questions
Why is 1.0.0-beta.11 newer than 1.0.0-beta.2?
Pre-release identifiers made only of digits are compared as numbers, so 11 is greater than 2. Text identifiers are compared character by character instead.
What does ^0.2.3 allow?
For versions below 1.0.0 the caret is stricter: ^0.2.3 means at least 0.2.3 and below 0.3.0, because a minor change before 1.0 may break things.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Build and check commit messages with type, scope, breaking changes and footers
Tested regular expressions for emails, URLs, dates, IDs and more
Searchable git commands by task, with undo recipes and risk warnings