Semver Comparator Online

Compare two semantic version strings and determine which is greater, with a major/minor/patch breakdown.

vs
Samples:

What Is Semver Comparator?

Semver Comparator parses and compares two semantic version strings according to the semver 2.0.0 specification. Enter any two version numbers — including pre-release identifiers like -alpha.1 or -rc.2 — and the tool instantly shows which version is greater, equal, or less, along with a component-by-component breakdown of major, minor, patch, and pre-release differences.

How to Use Semver Comparator

  1. Enter the first version string in the Version A field (e.g. 1.2.3 or v2.0.0-beta.1).
  2. Enter the second version string in the Version B field.
  3. The comparison result updates instantly — no button needed.
  4. Review the breakdown table to see which component differs.
  5. Use the sample buttons to load common comparison examples.

Features

  • Full semver 2.0.0 support — major, minor, patch, pre-release, build metadata
  • Pre-release comparison — correct precedence for alpha, beta, rc identifiers
  • Component breakdown — table showing diff per major/minor/patch field
  • v prefix support — strips leading v automatically
  • Instant results — comparison updates as you type
  • Sample versions — one-click examples for common scenarios

FAQ

What is semantic versioning?

Semantic versioning (semver) is a versioning scheme using three numbers: MAJOR.MINOR.PATCH. MAJOR increments for breaking changes, MINOR for new backwards-compatible features, and PATCH for backwards-compatible bug fixes.

How are pre-release versions compared?

A pre-release version has lower precedence than the associated normal version. For example, 1.0.0-alpha < 1.0.0. Pre-release identifiers are compared left to right: numeric identifiers use integer comparison, alphanumeric identifiers use ASCII sort order.

Does build metadata affect version precedence?

No. Build metadata (the part after +) is ignored when determining version precedence. Two versions that differ only in build metadata are considered equal in terms of precedence.

Can I use a v prefix like v1.2.3?

Yes. The tool automatically strips a leading v prefix before parsing, so v1.2.3 and 1.2.3 are treated identically.