Semver Compare
Compare two semantic versions, sort a list of versions, and inspect the parsed breakdown — fully compliant with SemVer 2.0.0.
A is older than B
Version A breakdown
- major
- 1
- minor
- 2
- patch
- 3
- prerelease
- —
- build
- —
Version B breakdown
- major
- 1
- minor
- 2
- patch
- 4
- prerelease
- beta.2
- build
- —
Sort multiple versions
Paste one version per line. Invalid lines are listed separately.
- 1. 1.0.0-alpha
- 2. 1.0.0-alpha.1
- 3. 1.0.0-beta
- 4. 1.0.0-rc.1
- 5. 1.0.0
- 6. 2.0.0-rc.2
- 7. 2.0.0
- 8. 10.4.0
About Semver Compare
Semver Compare is a free online tool to compare and sort Semantic Versioning strings using the official SemVer 2.0.0 ordering rules. Drop in two versions to see whether one is older, newer, or equal — or paste a list to sort all of them at once.
It correctly handles prerelease tags (such as 1.0.0-alpha being lower than 1.0.0),
ignores build metadata in comparisons (per the spec), and uses numeric comparison so 10.4.0 sorts after 2.0.0 rather than alphabetically.
Everything runs locally in your browser — versions are never sent over the network.
How to Use Semver Compare
- Type the first version into the Version A field — for example
1.2.3orv2.0.0-rc.1. A leadingvis allowed. - Type the second version into the Version B field. The relational result (
<,=, or>) appears immediately, along with a parsed breakdown of each version. - Use the swap button in the middle to quickly flip the two versions if you want to see the comparison from the other angle.
- Sort a list of versions by pasting one version per line into the bulk box. Pick ascending or descending order; invalid lines are flagged separately.
- Copy the sorted result with the Copy button to paste into a changelog, release script, or PR description.
Common Use Cases
Release planning
Decide whether a candidate is ahead of the latest published release.
Sorting Git tags
Order a noisy git tag -l output by true SemVer precedence.
Dependency audits
Verify whether an installed package version is older than a CVE-fixed minimum.
Changelog generation
Order entries chronologically by version when timestamps are missing.
Migration scripts
Pick the correct upgrade path between two database or config schema versions.
Prerelease ordering
Confirm the precedence of alpha → beta → rc → release builds.