Semver Range Tester
Check which versions a semver range matches. Paste a range like ^1.2.3 or >=2 <3 and a list of versions, and see what passes, what fails and why, plus the range in plain words.
Everything runs locally in your browser. Your data never leaves your device.
Anything npm understands works here: ^1.2.3, ~1.2, 1.x, >=2 <3, 1.2.3 - 2.0.0 or several of them joined with ||.
Options
One version per line. Quotes, commas, list dashes, comments and v prefixes are stripped, so a pasted JSON array or a tag listing works as it is.
Results
Range cheat sheet
| Range | What it matches |
|---|---|
| Caret and tilde | |
| 1.2.3 up to but not including 2.0.0. What npm writes by default. | |
| 0.2.3 up to but not including 0.3.0. Below 1.0.0 the minor is the breaking part. | |
| Only 0.0.3. Below 0.1.0 nothing is allowed to move. | |
| Patch updates only, 1.2.3 up to but not including 1.3.0. | |
| The same as 1.2.x, so 1.2.0 up to but not including 1.3.0. | |
| The same as 1.x, so 1.0.0 up to but not including 2.0.0. | |
| Wildcards and x-ranges | |
| Any version at all. | |
| Any 1.something version. | |
| Any patch of 1.2. | |
| A missing part works like a wildcard, so this is 1.x. | |
| The same as 1.2.x. | |
| Hyphen ranges | |
| From 1.2.3 to 2.3.4, both ends included. | |
| A partial start fills up with zeros, so it begins at 1.2.0. | |
| A partial end covers the whole 2.3 line, up to but not including 2.4.0. | |
| Comparators | |
| 1.2.3 or anything higher. | |
| Higher than 1.2.3, so 1.2.3 itself is out. | |
| Anything below 2.0.0. | |
| 2.0.0 or anything lower. | |
| Exactly 1.2.3. The same as =1.2.3. | |
| A space means and, so both bounds have to hold. | |
| Combining ranges | |
| Two pipes mean or, so either side matching is enough. | |
| The 1.x line, or anything from 3.0.0 upwards. | |
| Any number of alternatives can be chained. | |
| Prereleases and build metadata | |
| Prereleases of 1.2.3 from beta.1 onwards, plus stable releases below 2.0.0. | |
| Every prerelease of 1.0.0 and everything above it. | |
| Build metadata is ignored, so this matches 1.2.3 with any build tag. | |
Next steps
Send this tool's output straight into another tool.
Sort the lines of a text alphabetically, naturally, by length, by numeric value or shuffled. Reverse the order with a switch, and optionally trim lines, drop blank lines and remove duplicates in the same pass.
Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.
Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.
Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.
Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.
Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.
Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.
Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.