Search tools

Find a tool by name or what it does.

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

1.2.3 is lower than 1.3.0-beta.1.
1.2.3
A major1A minor2A patch3PrereleasenoneBuild metadatanone
1.3.0-beta.1
B major1B minor3B patch0Prereleasebeta.1Build metadatanone

Check a range

1.4.0 satisfies ^1.2.3.

How to work with semantic versions online

  1. 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.

  2. 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.

  3. 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.

  4. 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