Semantic Version Calculator
Compare two versions by semantic-versioning precedence, work out the next release with a bump, and check a version against a range.
Mode
Versions to compare
Check a range
1.4.0 satisfies ^1.2.3.
How to work with semantic versions online
Choose Compare or Bump
Pick Compare to see which of two versions is greater, or Bump to work out the next version from a starting point.
Enter your version or versions
In Compare mode, type Version A and Version B. In Bump mode, type a starting version and pick major, minor, patch, or a prerelease bump.
Read the breakdown
Compare shows the verdict plus each version split into major, minor, patch, prerelease, and build metadata. Bump shows the resulting next version.
Check a range if you need to
Enter a version and a range such as ^1.2.3, ~1.2.3, 1.x, or >=1.2.0 <2.0.0 to see whether it is satisfied.
Why use this tool
Correct semver precedence
Comparisons follow the semantic-versioning rules exactly: major, minor, and patch are compared numerically, a release always outranks a prerelease of the same triple, and dotted prerelease identifiers compare numerically when both sides are numeric.
Seven bump types
Bump a version by major, minor, patch, premajor, preminor, prepatch, or prerelease, with an optional label such as beta or rc for the prerelease identifiers.
Full field breakdown
Compare mode splits each version into its major, minor, patch, prerelease, and build metadata parts, so it is clear exactly which part decided the outcome.
Simple range checking
Check a version against a caret range, a tilde range, an x-range like 1.x, or a plain comparator combination such as >=1.2.0 <2.0.0.
Accepts a leading v
Versions written as v1.2.3, as they often appear in git tags and changelogs, are read the same as 1.2.3.
Runs entirely in your browser
Every comparison, bump, and range check happens on your device. Nothing is uploaded or logged.
About this tool
This tool works with versions written in the semantic-versioning format, major.minor.patch with an optional prerelease and build metadata, such as 2.4.1-rc.2+build.5. In Compare mode, enter two versions and see which one is greater, equal, or lower, following the precedence rules exactly: numeric fields compare in order, a plain release always outranks a prerelease of the same major.minor.patch, and when both sides have a prerelease its dot-separated identifiers compare left to right, numerically where both are numbers and lexically otherwise.
In Bump mode, enter a starting version and pick major, minor, patch, premajor, preminor, prepatch, or prerelease to see the next version. A prerelease label such as beta or rc can be set, and repeated prerelease bumps increment the trailing number rather than restarting it, matching how release tooling behaves when cutting a series of release candidates.
A separate range check accepts a version and a pattern such as a caret range (^1.2.3), a tilde range (~1.2.3), an x-range (1.x), or a plain comparator combination (>=1.2.0 <2.0.0), and reports whether the version satisfies it. Everything runs in your browser, which matters when the version string comes from an internal package or an unreleased build. To turn a JSON API response into typed code once you have settled on a version, see JSON to TypeScript or JSON to Python.
Frequently asked questions
- How does the comparison decide which version is greater?
- Major, minor, and patch are compared as numbers first. If those three are equal, a version with no prerelease outranks one with a prerelease, since a prerelease is considered a preview of that release. If both have a prerelease, their dot-separated identifiers are compared left to right: numeric identifiers compare numerically, alphanumeric identifiers compare lexically, and a numeric identifier always sorts below an alphanumeric one.
- What is the difference between patch and prepatch?
- Patch increments the patch number and drops any prerelease, landing on a plain release. Prepatch increments the patch number and adds a new prerelease on top, such as going from 1.2.3 to 1.2.4-alpha.0, which is useful for starting a release candidate cycle for the next patch.
- What happens if I bump a version that already has a prerelease?
- A plain major, minor, or patch bump on a version with a prerelease often lands on the same number rather than incrementing further, because the prerelease is already understood to come before that release. For example, bumping the patch of 1.2.3-alpha.1 gives 1.2.3, not 1.2.4.
- What range formats are supported?
- Caret ranges like ^1.2.3, tilde ranges like ~1.2.3, x-ranges like 1.x or 1.2.x, a bare major or major.minor, and space-separated comparator combinations such as >=1.2.0 <2.0.0. This covers the common cases; it is a simplified checker rather than a full package-manager range resolver.
- Does it accept a leading v, like v1.2.3?
- Yes. A leading v is stripped before parsing, so versions copied straight from a git tag or a changelog heading work without editing.
- Is my version data sent anywhere?
- No. Every comparison, bump, and range check runs entirely in your browser. Nothing is uploaded, stored, or logged.
Related tools
JSON to TypeScript
Paste JSON and get typed TypeScript interfaces, with nested objects, arrays, optional fields, and null handled for you.
JSON to Python
Paste JSON and get Python classes inferred from its shape, as dataclasses, typed dictionaries, or plain dictionary access.
JSON Escape and Unescape
Convert text to and from JSON string literals, with correct quote, backslash, and newline escaping.
JSON Path Finder
List every value in a JSON document with its exact access path, then filter to find the one you need.
JSON Schema Generator
Paste a JSON sample and get a JSON Schema, with property types, array items, required fields, and string formats inferred for you.
JSON Key Sorter
Alphabetise the keys of any JSON document at every level of nesting, then pretty-print the result.