Semantic Version (SemVer) Calculator
Compare two semantic version strings using official SemVer precedence rules to see which is greater, or bump a version's major, minor, patch, or prerelease number.
- Switch between Compare Versions and Bump Version using the pill bar.
- Compare: enter two version strings (e.g. 1.2.3 and 1.10.0-beta.2) to see which has greater precedence and why.
- Bump: enter a base version, choose Major, Minor, Patch, or Prerelease, and optionally set a prerelease identifier.
- Copy the resulting version string, or adjust inputs to try different comparisons and bumps instantly.
All processing happens entirely in your browser. Your data never leaves your device.
Key Features
- Full SemVer 2.0.0 format validation (major.minor.patch[-prerelease][+build])
- Official precedence comparison, including correct prerelease identifier rules
- Clear greater/equal/lesser verdict with a parsed breakdown of both versions
- Version bump for Major, Minor, and Patch, resetting lower components correctly
- Prerelease bump that increments an existing numeric identifier or starts a new one
- Custom prerelease identifier field (e.g. beta, rc, alpha)
- One-click copy of the resulting version string
- 100% client-side — no version numbers are sent anywhere
About Semantic Version (SemVer) Calculator
Semantic Versioning (SemVer) is the widely-adopted versioning scheme used by npm, most package managers, and countless software projects. A version number follows the pattern MAJOR.MINOR.PATCH, optionally followed by a prerelease tag (e.g. -beta.1) and build metadata (e.g. +20260825). The rules for exactly which version is "greater" get surprisingly detailed once prerelease tags are involved — numeric identifiers compare numerically, alphanumeric identifiers compare lexically, and a version with a prerelease tag always has lower precedence than the same version without one.
Getting this wrong is a common source of bugs in dependency resolution, changelogs, and release automation. ForgeKit's SemVer Calculator implements the full official precedence algorithm from semver.org — including correct handling of prerelease identifier comparison — so you can check exactly how two versions compare, or compute the next version number after a change.
The Bump mode mirrors the behavior of common versioning tools: a major bump resets minor and patch to zero, a minor bump resets patch to zero, and a prerelease bump either increments an existing prerelease's trailing number or starts a new prerelease train. All parsing and comparison happens instantly in your browser using a hand-rolled implementation of the semver.org regular expression and precedence rules.
Frequently Asked Questions
Standard Semantic Versioning: major.minor.patch, e.g. 2.4.0. You can optionally add a prerelease tag with a hyphen (2.4.0-rc.1) and build metadata with a plus sign (2.4.0-rc.1+20260825). Leading zeros in numeric components (like 01.2.3) are not valid SemVer and will be rejected.
No. Per the official SemVer specification, build metadata (the part after a + sign) is completely ignored when determining precedence. Two versions that differ only in build metadata are considered equal.
This is rule 11 of the SemVer spec: a prerelease version is considered a pre-release of the associated normal version, so it has lower precedence. For example, 1.0.0-alpha is less than 1.0.0.
It bumps the patch number and starts a new prerelease train at identifier.0 (e.g. 1.2.3 → 1.2.4-beta.0). If a prerelease tag already exists and ends in a number, that number is incremented instead (e.g. 1.2.4-beta.0 → 1.2.4-beta.1).
It follows the same official semver.org specification and precedence rules that npm's semver package implements, hand-rolled for this browser tool. Behavior for standard comparisons and bumps should match, though it doesn't cover every edge-case range-matching feature of the full npm library (like ^ and ~ ranges).