Skip to main content
Software Version / Package Tools

SemVer Validator

Check whether version strings follow Semantic Versioning 2.0.0 exactly, and see precisely which rule an invalid one breaks.

Paste one version per line - each is checked against the official SemVer 2.0.0 grammar, with a plain-English reason for anything that fails.

Once your versions are valid, use the Version Comparator to see how they order, or the Version Increment Generator to work out the next release number.

What Is the SemVer Validator?

It checks version strings against the Semantic Versioning 2.0.0 specification: exactly three dot-separated numbers (MAJOR.MINOR.PATCH), no leading zeros, and optional -prerelease and +build parts made of ASCII letters, digits and hyphens.

When to Use It

  • Before publishing a package, to make sure the registry and tools like npm or Cargo will accept the version.
  • When a CI job, changelog or release script rejects a version and you need to know why.
  • When cleaning up a list of historical tags (e.g. v1.2, 1.02.0) into proper versions.

How to Use It

  1. Paste one version per line.
  2. Tick the option to accept a leading v if your versions come from Git tags.
  3. Click Validate - each line is marked Valid or Invalid.

Examples

  • 2.0.0-rc.1+build.7 - valid: prerelease rc.1, build metadata build.7.
  • 1.02.3 - invalid: MINOR has a leading zero.
  • 1.2 - invalid: PATCH is missing (the closest valid version is 1.2.0).
  • 1.0.0-alpha..1 - invalid: empty prerelease identifier.

Understanding the Result

For valid versions you see each part separately. A prerelease makes the version rank below the same release without one (1.0.0-rc.1 < 1.0.0), and build metadata is ignored when versions are compared. For invalid versions, the "closest valid version" is only a suggestion - check it matches what you meant.

Limitations

This checks SemVer 2.0.0 only. Some ecosystems use different schemes - Python uses PEP 440 (e.g. 1.0rc1) and Composer allows four-part versions - so a version can be invalid SemVer yet fine for that registry. To build a version from its parts, use the Semantic Version Generator.

Frequently Asked Questions

Strictly, no - SemVer 2.0.0 does not allow a "v" prefix. It is a common Git tag convention, and npm accepts it, so tick the option to allow a leading v if your versions come from tags.

SemVer forbids leading zeros in MAJOR, MINOR, PATCH and numeric prerelease identifiers, so 1.02.3 must be written 1.2.3.

Yes. Paste up to 500 versions, one per line, and each is checked separately.
Share this tool: