Skip to content
Jellykit

Semver Parser & Validator

Check whether a version string is valid semver and see its major, minor, patch, prerelease and build parts.

  • Runs on your device
Loading tool

About Semver Parser & Validator

Paste a version such as v3.0.0-rc.2+build.20261204 to find out whether it is a valid Semantic Versioning 2.0.0 string and how it breaks down: the three release numbers, each prerelease identifier, and any build metadata.

When a version is invalid you get the precise reason, such as a leading zero in the minor number, an empty identifier or a character that is not allowed, rather than a bare “invalid”. The page also says whether the version is a stable release, a prerelease, or still in 0.y.z initial development.

How it works

  1. Choose a task. Compare orders two versions by precedence and names the release type between them; build metadata after + is ignored, as the specification requires.
  2. Bump applies a release type the way npm version does: a prerelease of 2.0.0 bumps to 2.0.0 itself, and the pre- types add or advance a numbered prerelease label.
  3. Range rewrites caret, tilde, x-, hyphen and comparator ranges into plain comparators, then tests each version you list against them.
  4. Everything is calculated in this page as you type, and the inputs are kept in the page address so a check can be shared as a link.

Questions

What makes a version string invalid?

It needs exactly three dot-separated numbers without leading zeros. A prerelease after - and build metadata after + are made of dot-separated identifiers of ASCII letters, digits and hyphens, none empty, and a purely numeric prerelease identifier may not start with 0.

Is the v in v1.2.3 part of the version?

No. It is a common tag prefix, so it is accepted and removed, and the page notes that it did so. The normalised form shown is the version without it.

Why are numeric and alphanumeric identifiers listed separately?

They sort differently: numeric prerelease identifiers compare as numbers, so beta.11 comes after beta.2, while alphanumeric ones compare as ASCII text, and any numeric identifier ranks below any alphanumeric one.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.