SemVer Comparator
Compare two versions, optionally sort a list and check each listed version against a range. Compatibility here means range membership, not API compatibility.
Ranges: ^ ~ >= <= > < =; spaces mean AND; || means OR. Prereleases need an explicit same-core prerelease in the matching branch. Build metadata does not affect precedence.
Local only · full major.minor.patch · 256 characters/version · 2,000 list entries · 200,000 list characters · 4,096 range characters · 32 OR branches
A QUICK WALKTHROUGH
How to use this tool
- Enter two complete versions.
- Optionally enter a list and a supported range.
- Compare precedence and read the sorted matches.
Supported ranges
Use complete versions with =, >, <, >=, <=, ^ or ~. Space-separated comparisons mean AND; || means OR. Partial versions, wildcards, commas, hyphen ranges and parentheses are not supported. ^ allows changes below the first nonzero core component; ~ allows patch changes.
Prereleases and limits
Prereleases follow SemVer numeric and ASCII identifier order. A range admits a prerelease only if that OR branch explicitly mentions a prerelease with the same major.minor.patch. Build metadata is ignored. Up to 2,000 list entries, 200,000 list characters, 256 per version, 4,096 per range and 32 OR branches.
GOOD TO KNOW
Common questions
Does a matching range prove compatibility?
No. It only shows that the declared version satisfies this range; it cannot inspect code or APIs.
What happens to equal versions?
Sorting preserves input order for equal precedence, including different build metadata. Every entry is retained.