SemVer compare & sort

Client

Compare two Semantic Versioning strings or sort a list of versions using SemVer 2.0.0 precedence—core numbers first, then prerelease identifiers. Optional v prefix is accepted.

Semantic versioning in release pipelines

SemVer gives a shared rule for ordering releases: numeric core versions, then prerelease labels such as -rc.1 or -beta.2, with build metadata after + ignored for ordering. Use this page when you reconcile tags from registries, container hosts, or spreadsheets before you publish.

For calendar or build IDs paired with versions, also see the Unix timestamp tool when you align artifacts with log lines or CI clocks. For prose release notes or version bullets (when assisted generation is enabled), README & CHANGELOG drafts can sit alongside manual sorting here.

Using this page

Use compare when you have exactly two tags and need a quick before/after decision. Use sort when you pasted many lines from a registry UI or spreadsheet—one version per line, optional leading v. Invalid lines are reported so you can fix typos before sharing the list.

Compare two versions

?

Uses Semantic Versioning 2.0.0 rules: core numeric parts, then prerelease identifiers. Build metadata (+…) is ignored for ordering.

Try examples

Enter two versions to compare.

Sort a list

One SemVer per line—invalid lines are kept at the bottom in their original order.

Paste at least one non-empty line to see a sort.

Nearby workflows on Toolcore

Common use cases

  • Decide whether 1.2.3-rc.1 should ship before 1.2.3 when reading release notes.
  • Sort package or image tags from a spreadsheet before publishing or tagging.
  • Pair with timestamps when correlating builds with calendar dates in changelogs.
  • Normalize CI or container registry tag lists before promoting the highest SemVer-shaped release.

Common mistakes to avoid

  • Treating build metadata (+…) as part of precedence

    Build is ignored for version ordering—only core and prerelease matter for SemVer 2.0.0.

  • Assuming every ecosystem uses strict SemVer

    CalVer, date-based tags, and custom schemes exist—this tool only applies SemVer-shaped strings.

  • Using lexicographic string sort for versions

    String sort puts 2.0.10 before 2.0.2—always use SemVer rules for numeric core parts.

FAQ

Are versions sent to Toolcore?

No. Parsing and sorting run entirely in your browser.

Why is my version invalid?

Core parts must be non-negative integers without leading zeros. Prerelease identifiers follow SemVer 2.0.0 grammar.

Does this validate npm ranges like ^1.0.0?

No. This page compares exact version strings. Range operators are not implemented here.

Is a leading v allowed?

Yes. A single leading v (for example v1.0.0) is stripped for parsing; output ordering follows the numeric core and prerelease rules underneath.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • semver compare online
  • semantic versioning sort tool
  • compare two semver versions

Related utilities you can open in another tab—mostly client-side.