DEVELOPER WORKBENCH

Semantic Version & Range Tester

Sort semantic versions, compare releases against a reference and test npm version ranges. Inspect prerelease gating, build metadata, invalid versions and highest matching releases.

Local processingEditable exampleCopy + file exports

Settings

Try the example or enter your own settings.

SemVer precedence and npm ranges use different rules. Build metadata is preserved but ignored for precedence. A matching range does not prove software compatibility. Numeric core/prerelease identifiers are bounded to safe integers; range numeric runs use the same conservative bound. No package registry requests or installations.

Using Semantic Version & Range Tester

Sort semantic versions, compare releases against a reference and test npm version ranges. Inspect prerelease gating, build metadata, invalid versions and highest matching releases.

  1. Paste versions, one per line, or load a UTF-8 text file. The example includes releases, prereleases, builds and invalid version syntax.
  2. Enter an optional npm range and reference version. Choose default prerelease gating or the explicit override, then run the audit.
  3. Review invalid rows, comparison results and expanded range comparators. Copy or download JSON, sorted valid versions, matching versions or the full audit CSV.

Example

Try the included editable example.
Enter an optional npm range and reference version. Choose default prerelease gating or the explicit override, then run the audit.

Questions & answers

What version syntax is supported?

Strict major.minor.patch with optional SemVer prerelease and build labels. Core numbers and numeric prerelease labels cannot have leading zeros. An optional mode accepts a lowercase v prefix. Versions such as1.2, latest, workspace:* or arbitrary text are not coerced into versions.

Which range syntax does this use?

npm/node-semver7.8.5: comparison sets, ||, ^, ~, wildcards, partial versions and hyphen ranges. Range syntax is ecosystem-specific and is not specified by SemVer2.0.0. Blank range means no test in this tool; enter* to test the wildcard range.

Why does a prerelease fail a range even when its version is higher?

By default, npm ranges gate prereleases: a comparator set must include a prerelease comparator with the same major/minor/patch tuple. The explicit include-prerelease option changes that behavior. JSON shows the expanded comparator sets and active option.

Does build metadata change sorting?

No. 1.2.3+build.1 and1.2.3+build.2 have equal SemVer precedence. Build labels stay in exports; equal-precedence entries preserve source order. Duplicates are retained rather than silently removed.

Can this tell me whether an update is safe?

No. It checks syntax and declared range mathematics, not source code, package availability, security advisories or actual API compatibility. It never queries registries or installs packages.

What limits and export rules apply?

1,000 nonempty version lines and100,000 input characters; individual versions up to256 characters. Range up to400 characters,20 OR branches and50 whitespace tokens. Core and numeric prerelease identifiers are at most9,007,199,254,740,991; range numeric runs use that bound. Invalid rows stay in JSON/CSV but are omitted from valid/matching text lists.

Help improve this tool

Report a problem or suggest an improvement

Describe the issue without pasting private tool input. Feedback goes to our admin inbox.

Find another tool · Read practical guides