How to use this tool
- Enter two version strings (e.g. 1.2.3 and 2.0.0) into the inputs.
- Review the comparison result: newer, older, or equal.
- Copy the result or use it to decide upgrade paths and dependency ranges.
About Semver Compare
This tool helps you quickly compare semantic versions when choosing upgrades, validating dependency ranges, or debugging version conflicts. It follows the semver 2.0 spec for major.minor.patch and optional prerelease/build metadata.
Common use cases
- Checking if a dependency version satisfies a required minimum
- Deciding upgrade order when multiple packages have new releases
- Validating version strings before publishing or tagging
FAQ
- What is semantic versioning and how does comparison work?
- Semantic versioning uses major.minor.patch (e.g. 1.2.3). Comparison compares major first, then minor, then patch. Prerelease tags (e.g. 1.0.0-alpha) sort before the release version.
- Does this tool send my version strings to a server?
- No, all comparison runs in your browser. Your input stays on your device.
- Does it support prerelease and build metadata?
- Yes, prerelease identifiers (e.g. alpha, beta, rc) and build metadata are parsed and compared according to semver 2.0 rules. Build metadata is ignored for comparison.
- What happens if I enter invalid version strings?
- The tool reports invalid input and does not produce a comparison. Fix the format to match semver (e.g. 1.2.3) and try again.