Developer

Runs in your browser. No file uploads for processing.

npm SemVer Range Tester & Comparator (No Registry Lookup)

Test versions against one or two npm dependency ranges locally. See matches, differences and npm’s prerelease behavior.

Loading tool...

How to test an npm dependency range

  1. Enter the versions to test

    Paste one complete version per line, such as 0.2.3 or 0.3.0-beta.1. The test does not query npm or check whether those versions were ever published.

  2. Enter one range or compare two

    For example, caret ^0.2.3 matches 0.2.3 and 0.2.4 but not 0.3.0. Compare it with >=0.2.4 <0.4.0 to see which entered versions are accepted by only one range.

  3. Review prereleases or export the result

    The default uses npm’s usual prerelease matching rules. Turn on includePrerelease to see how the same supplied versions behave under that option. The optional JSON contains your inputs and per-row results.

Use cases

  • Rehearse changing a package.json range before opening a pull request.
  • Check why a zero-major caret or prerelease did not match the version you expected.

Limits and privacy

  • At most 500 version rows, 64 KiB UTF-8 and 256 characters per range. No registry lookup, package install, advisory check or full range-subset proof.
  • Separate rows with equal precedence or duplicate input remain separate rows. The comparison covers only the entered versions.

The tool processes inputs in your browser. Account features and usage analytics are separate.

Frequently asked questions

Can I test changing a range inside a package.json patch?

Use JSON Patch Rehearsal to preview the structural edit, then paste the updated range here to test matching against a version list. Neither tool installs packages.

Does ^0.2.3 allow 0.3.0?

No. That caret range allows compatible versions below the next nonzero component, so 0.2.4 can match and 0.3.0 cannot.

Do regular npm ranges match prerelease versions?

By default, npm’s range matcher only accepts a prerelease if a comparator in the matching set has a prerelease on the same major, minor and patch. Use includePrerelease to test the explicit alternative behavior.

Can this prove that two ranges are equivalent?

No. It compares both ranges against the supplied versions. The ranges could differ on versions you did not enter.

Are packages or version lists sent to npm?

No. The parser runs in your browser, does not install or fetch packages, and does not request a list of published versions.

Related tools