How It Works Under the Hood
Powered directly by the standard `semver` package used by npm itself, the tester parses comparator sets (`^`, `~`, hyphen ranges, `||` unions), checks each version with optional prerelease inclusion, sorts matching releases, and exposes `semver.compare`, `semver.diff`, and `semver.inc`.
Step-by-Step Instructions
Enter an npm version range expression such as `^1.2.0` or `>=1.4.0 <2.0.0`.
Paste candidate package versions (one per line or comma-separated) and toggle prerelease inclusion if needed.
Inspect normalized range bounds, highest `maxSatisfying` match, and pass/exclude tags per version.
Use the lower cards to compare two exact versions or preview `patch`, `minor`, `major`, and `prerelease` bumps.
Key Features & Performance
- Authentic npm `semver` resolution guarantees exact parity with `package.json` and lockfile behavior
- Computes `maxSatisfying` and `minSatisfying` across arbitrary candidate lists instantly
- Side-by-side two-version comparator reports exact release difference (`major`, `minor`, `patch`, `prerelease`)
- Interactive version bump calculator previews `patch`, `minor`, `major`, and named prerelease increments (`alpha`/`beta`/`rc`)
- Runs entirely client-side with zero registry polling needed
Methodology, Formulas & Technical Standards
Follows SemVer 2.0.0 and npm node-semver precedence rules, including `0.x.y` caret behavior (`^0.2.3` translates to `>=0.2.3 <0.3.0`) and strict prerelease opt-in gating.
Common Real-World Use Cases
- Verifying whether `^0.14.0` accidentally permits breaking `0.15.0` upgrades in `package.json`
- Testing complex compound ranges (`>=18.0.0 <20.0.0 || ^20.11.0`) before changing `engines.node`
- Computing exact next prerelease tags (`1.4.2 -> 1.4.3-beta.0`) during CI/CD release dry runs
- Settling version ordering debates (`1.5.0-rc.1` vs `1.5.0`) objectively
Worked Examples & Edge Cases
Zero-Major Caret Behavior
Range: ^0.2.3 | Candidates: 0.2.9, 0.3.0
Matches: 0.2.9 (maxSatisfying) | Excluded: 0.3.0
In `0.x.y`, caret locks the minor digit because breaking changes happen in minor bumps.
Prerelease Precedence
Left: 1.4.2 | Right: 1.5.0-rc.1
1.4.2 is older than 1.5.0-rc.1 (diff: premajor/preminor)
Prerelease comes before `1.5.0` final, after `1.4.2`.
Limitations, Scope & Accuracy Notes
- • Evaluates SemVer 2.0.0 / npm syntax; Python PEP 440 (`~=`) or Cargo-specific variations outside standard SemVer require manual translation.
- • Does not query remote npm registries so offline privacy is preserved.
Local Browser Processing & Privacy
Traditional web converters upload your documents, snippets, or media files to remote servers. SemVer Range & npm Version Tester runs inside your browser tab:
Your input text and files are processed locally without uploading payloads to a processing server.
Microdeck does not log or store the files or inputs you paste into tool workspaces (normal static hosting/CDN requests still load page assets).
Working outputs stay in your browser tab and are released when you reset the tool or close the tab.
Frequently Asked Questions
Why does `^1.2.0` ignore `1.5.0-alpha.1` by default?
Per npm SemVer rules, prerelease versions do not match comparators unless the comparator explicitly shares the same `[major, minor, patch]` tuple or prerelease mode is toggled on.
What is the difference between `~1.2.3` and `^1.2.3`?
Tilde `~1.2.3` allows patch updates (`<1.3.0`), whereas caret `^1.2.3` allows minor and patch updates (`<2.0.0`).
Does this support `||` union ranges?
Yes. Expressions like `^16.0.0 || ^18.0.0` evaluate natively through `semver.validRange`.
Are trailing build metadata tags (`+build.42`) ignored in precedence?
Yes. Per SemVer 2.0.0 §10, build metadata does not affect version ordering.
Explore Related Micro-Tools
Stack .gitignore Builder & Deduplicator
Compose clean deduplicated .gitignore templates across Node, Astro, Python, Rust, Go, macOS, VS Code & Docker
JSON Schema Draft Validator
Validate JSON payloads against JSON Schema rules (`required`, `type`, `enum`, `format`, `additionalProperties`, numeric/string bounds)
Cron Expression Humanizer & Timeline
Translate crontab syntax to natural speech with next 10 runs