Online Tool Store Online Tool Store

Semver Checker

Validate two semantic version strings and compare them, seeing exactly whether the difference is a major, minor, or patch bump. Runs entirely in your browser.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Comparison

A valid?
B valid?
Change type
Greater

How it works

  1. Switch to "Compare two versions" to check two version strings against each other, "Check against a range" to test one version against a package.json-style range, or "Batch check" to test a whole pasted list of versions against one range at once.
  2. Each version is validated against the strict semantic versioning grammar (major.minor.patch, no leading zeros, with optional pre-release/build metadata), and invalid ones get a specific reason why.
  3. In compare mode, the tool reports which version is greater and the exact change type: major, minor, patch, pre-release, or equal — use "Swap A ⇄ B" to flip the two versions without retyping them.
  4. In range mode, the tool reports whether the version satisfies the range, supporting caret, tilde, comparison operators, x-ranges, hyphen ranges, and AND/OR combinations.
  5. In batch check mode, each pasted version gets its own match/no-match result (or an "Invalid version" flag), plus a running count of how many versions matched.
  6. Use the "Copy result" / "Copy results" button in any tab to copy a plain-text summary of the outcome.

The formula

Versions are compared field by field: major first, then minor, then patch, then pre-release tag. The first field that differs decides the result — a version without a pre-release tag always outranks the same version with one, and build metadata is ignored entirely. Within a pre-release tag, each dot-separated identifier is compared left to right, numeric identifiers numerically and alphanumeric ones lexically, per the official semver.org precedence rules.

FAQ

What counts as a valid semantic version?

A version in the form major.minor.patch, like 2.5.1, optionally with a pre-release tag like 2.5.1-beta.2 and build metadata like +build.7. Per the official semver spec, major, minor, and patch cannot have leading zeros (1.2.3 is valid, 01.2.3 is not), and build metadata is accepted but ignored when comparing.

How are pre-release versions compared?

A version with a pre-release tag (like 1.0.0-alpha) is considered lower than the same version without one (1.0.0). Between two pre-release versions, each dot-separated identifier is compared left to right — numeric identifiers numerically, alphanumeric ones lexically — exactly as the official semantic versioning precedence rules define it, so 1.0.0-9 correctly sorts before 1.0.0-10.

Can I check if a version satisfies a range like ^1.2.3?

Yes — the "Check against a range" tab supports the same syntax used in package.json: exact versions, comparison operators (>=, <=, >, <), caret (^) and tilde (~) ranges, x-ranges (1.2.x), hyphen ranges (1.2.3 - 2.3.4), multiple conditions joined with spaces (AND), and alternatives joined with || (OR).

Can I check a whole list of versions against a range at once?

Yes — the "Batch check" tab takes one range and a pasted list of versions (one per line) and reports a match/no-match result for each, plus a summary count, so you can filter a changelog or a list of installed versions in one pass.

Why does this matter for dependency ranges?

Knowing whether an update is a major, minor, or patch bump tells you whether it is likely to introduce breaking changes before you upgrade a package — and checking a specific version against your package.json range tells you whether npm would even pick it up.

Is my version string sent anywhere?

No — parsing, comparison, and range checking all happen entirely in your browser.

How we compare

Feature Online Tool Store npm semver calculator DevToolLab Semver Calculator InventiveHQ Semver Calculator
Side-by-side compare with exact change type (major/minor/patch/pre-release)
Range checking (^, ~, x-ranges, hyphen ranges, comparison operators, AND/OR)
Batch-check a pasted list of versions against one range
No install required
No sign-up

If you just need a quick "is this a breaking change" answer, or want to know whether a version would satisfy your package.json range, Semver Checker gives you both in one place without opening a terminal.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.