All tools

Semver Calculator

Code

Parse, compare, and check semantic version ranges

Compare two version strings to see which is greater, paste a range like `^1.2.3` or `~2.0.0` to see exactly what it would match before adding it to package.json, or bump a version by major/minor/patch for a release script, all built around the same semantic versioning 2.0.0 rules and npm-style caret/tilde range syntax most JS tooling relies on. Pre-release and build metadata suffixes, like `1.0.0-beta.1`, are parsed and correctly factored into comparisons and range matching rather than ignored. Ranges can be combined with `||` or space-separated AND logic the same way npm does, so checking a version against multiple constraints at once works without extra tooling. It follows the same spec and aims for matching behavior as the actual `semver` npm package, but for anything build-critical, rely on that real package in your pipeline rather than this tool's output alone.

semverversioncomparerange

How to use Semver Calculator

  • 1.Enter two version strings to check which one is greater, useful when writing upgrade logic or changelog tooling.
  • 2.Paste a version range like `^1.2.3` or `~2.0.0` to see exactly which versions it would match before adding it to package.json.
  • 3.Increment a version (major, minor, or patch) to get the correctly bumped version string for a release script.

Frequently asked questions

What semver spec does this follow?
It implements the same semantic versioning 2.0.0 rules and range syntax used by npm, including caret (`^`) and tilde (`~`) ranges.
Does it handle pre-release tags like `1.0.0-beta.1`?
Yes, pre-release and build metadata suffixes are parsed and correctly factored into comparisons and range matching.
Can I check if a version satisfies multiple ranges at once?
Yes, you can combine ranges with `||` or space-separated AND logic, matching npm's range syntax.
Is this the same logic as the `semver` npm package?
It follows the same specification and aims for matching behavior, but for critical build logic you should still rely on the actual `semver` npm package in your pipeline.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/semver \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"version":"1.2.3","compare":"1.0.0"}'

Get an API key from your dashboard · Full API docs →