Skip to content
hateitall

SemVer Parser

Check whether a version string is valid SemVer and see each of its parts explained.

Processed locallyIn: VersionOut: Parts, JSON

Loading tool…

How to use semver parser

  1. Type or paste a version, or click an example.

  2. Read whether it is valid; if not, each broken rule is listed separately.

  3. See the major, minor and patch numbers, each pre-release identifier and its type, and the build metadata.

  4. Copy the parts as JSON.

What this tool does

  • Validates against every rule in SemVer 2.0.0, including no leading zeros and no empty identifiers.
  • Labels each pre-release identifier as numeric or text, which decides how it sorts.
  • Accepts a leading v (as in git tags) with a note, or refuses it in strict mode.
  • Gives a normalised form and the release line, such as 2.4.x.

How the result is verified

The parts are printed back into a version string and parsed again; the second parse must give the same parts.

Frequently asked questions

Is v1.2.3 a valid semantic version?

Not strictly: the v is a tagging habit, not part of the version. Most tools strip it, and this parser does too unless you switch on strict mode.

What is build metadata for?

Anything after + identifies a particular build, such as a commit hash or date. It is ignored when comparing versions, so 1.0.0+a and 1.0.0+b rank equally.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Compare and bump versions, check npm ranges and sort version lists

Version · Range→ VersionLight on device

Tested regular expressions for emails, URLs, dates, IDs and more

Text→ RegexLight on device

Build and check commit messages with type, scope, breaking changes and footers

Text→ Commit messageLight on device

Searchable git commands by task, with undo recipes and risk warnings

Text→ CommandLight on device