SemVer Validator

Validate SemVer 2.0.0 format, inspect version parts, compare two versions and sort a list of version numbers.

1️⃣ Validate

Valid ✓
Major
1
Minor
2
Patch
3
Pre-release
beta.1
Build metadata
build.42

Valid examples: 1.2.3 / 1.2.3-beta.1 / 1.0.0-rc.1+build.5 / 0.0.1-alpha

2️⃣ Compare

vs
A (1.4.0) A is greater than B B (1.4.0-rc.1)

3️⃣ Sort list

Sorted result (0 valid versions)
Click Sort to see results

Invalid lines are ignored

SemVer rules: MAJOR.MINOR.PATCH (non-negative integers, no leading zeros); pre-release (-prerelease) sorts lower than the release; build metadata (+build) is ignored for precedence; numeric identifiers compare numerically, alphanumeric identifiers compare in ASCII order, and numeric identifiers have lower precedence than alphanumeric.

What is SemVer Validator?

The SemVer validator is a free online developer tool that checks whether a version string complies with Semantic Versioning 2.0.0, and parses it into major, minor, patch, prerelease and build metadata. It compares two versions using the official SemVer precedence rules, and sorts a multi-line version list ascending or descending while ignoring invalid lines. Great for npm package checks, CI/CD release validation, dependency audits and software version management. Everything runs locally in your browser.

Use Cases5 scenarios
  • npm package version checks
  • CI/CD release validation
  • Dependency version audits
  • Version normalization
  • Teaching SemVer rules
How to Use4 steps
  1. 1Enter a version to validate its format
  2. 2Inspect the parsed parts
  3. 3Enter two versions to compare
  4. 4Paste a version list and sort it
Features6 features
  • SemVer 2.0.0 validation
  • Parse major/minor/patch
  • Prerelease and build parsing
  • Two-version comparison
  • Batch sorting
  • Browser-based
FAQ7 questions
What is SemVer Validator?

An online Semantic Versioning (SemVer 2.0.0) validator. Parse version parts, compare two versions and sort version lists.. Everything runs locally in your browser — no uploads.

What is Semantic Versioning?

SemVer 2.0.0 defines MAJOR.MINOR.PATCH: MAJOR for breaking changes, MINOR for backward-compatible features, PATCH for backward-compatible fixes, with -prerelease suffixes for pre-releases.

Which is bigger: 1.0.0 or 1.0.0-beta?

1.0.0 is bigger. A version with a prerelease identifier has lower precedence than the corresponding release, so 1.0.0-beta < 1.0.0.

Are leading zeros allowed?

No. SemVer forbids leading zeros in numeric identifiers: 01.2.3 is invalid and should be written 1.2.3.

Does build metadata affect precedence?

No. +build carries metadata only and is ignored when comparing, so 1.0.0+build.1 equals 1.0.0.

How are prerelease identifiers compared?

Split by dots and compare segment by segment: numeric identifiers compare numerically, alphanumeric ones in ASCII order, numeric identifiers sort below alphanumeric, and more identifiers means higher precedence.

Is my data uploaded?

No. All validation and comparison runs locally in your browser.