Semver Checker
Check versions against semver ranges
Test whether versions satisfy npm-style ranges like ^1.2.0 or ~2.x, compare and sort versions, and see ranges explained.
- Semver
- npm
- Version
How to use Semver Checker
- Type an npm-style Range, such as
^1.2.0,~2.x,>=2.1 <3or1.2.3 - 2.3.4, or press Try an example. Means shows the range as plain bounds. - Paste Versions separated by spaces, commas or new lines. Each is marked as satisfying the range or not, with the reason, and Summary shows the highest and lowest match and any versions that aren’t valid SemVer.
- Tick Include prereleases to let prerelease versions such as
2.0.0-beta.1match any range, as npm’s--include-prereleasedoes. - Read Sorted by precedence, switching between Newest first and Oldest first, and copy the list or the check results.
- In Bump preview, enter a Version (or leave it to use the first sorted version) and an optional Prerelease id like
betato see what eachnpm versionbump would produce.
How it works
Versions are parsed strictly by SemVer 2.0.0: MAJOR.MINOR.PATCH, an optional -prerelease and +build, with no leading zeros. A leading v or = is accepted. Precedence compares the three numbers, then puts a prerelease below its release and compares prerelease identifiers one by one: numbers numerically, text in ASCII order, and numbers below text. Build metadata is ignored.
Ranges follow the grammar documented by npm’s node-semver. || separates alternatives and spaces join comparators (<, <=, >, >=, =). ^ allows changes that don’t modify the leftmost non-zero number, ~ (or ~>) allows patch changes, x, X, * or a missing part is a wildcard, and A - B is an inclusive hyphen range. Each range is rewritten into bounds such as >=1.2.0 <2.0.0-0, which is what Means shows.
As in npm, a prerelease version only matches when one of the comparators in the same alternative has a prerelease on the same major, minor and patch, so ^1.2.3-beta.1 matches 1.2.3-beta.2 but not 1.2.4-beta.1. Bumps follow node-semver’s inc(). Everything runs in your browser.
Limits
- Versions must be full
x.y.zversions. Partial versions like1.2, leading zeros and numbers above JavaScript’s safe integer limit are rejected. In Versions, spaces separate entries, so each version must be written without spaces. - A hyphen range must be the whole alternative:
1.2.3 - 2.3.4works, but1.2.3 - 2.3.4 <2.0.0doesn’t. - node-semver’s
loosemode and coercion of strings like1.2to1.2.0aren’t supported; build metadata in ranges is ignored. - Bumping drops any build metadata, and the Prerelease id must be a valid SemVer identifier (letters, digits and
-).
Privacy
Everything runs in your browser, and nothing is uploaded or saved; the site’s Content Security Policy blocks requests to other servers, so no versions are looked up on the npm registry. Copy share link puts the range, the versions and the prerelease setting in the link’s # fragment, which browsers don’t send to servers. Text sent here from another tool with Send to… arrives through this tab’s session storage and is removed as soon as it is read.
Frequently asked questions
What is the difference between ^ and ~?
^1.2.3 allows any 1.x.x from 1.2.3 up, so minor and patch updates. ~1.2.3 allows only 1.2.x from 1.2.3, so patch updates. Below 1.0.0 the caret is stricter: ^0.2.3 means >=0.2.3 <0.3.0-0.
Why doesn’t 2.0.0-beta.1 satisfy >=1.0.0?
npm only lets a prerelease match a range that mentions a prerelease of the same major.minor.patch, so you don’t get unstable versions by accident. Tick Include prereleases to match them anyway.
What does the -0 in <2.0.0-0 mean?
2.0.0-0 is the lowest possible prerelease of 2.0.0. Using it as the upper bound excludes 2.0.0 and all its prereleases, such as 2.0.0-alpha.
Is 1.0.0-alpha.10 newer than 1.0.0-alpha.9?
Yes. Numeric prerelease identifiers are compared as numbers, so 10 is greater than 9. Text identifiers are compared in ASCII order, and a numeric identifier is always lower than a text one.
Does build metadata like +build.5 affect matching?
No. SemVer ignores build metadata for precedence, so 1.2.3+build.5 sorts and matches exactly like 1.2.3.
Does this behave exactly like npm?
It follows node-semver’s documented range grammar and prerelease rules, including ~>, x-ranges and hyphen ranges. It doesn’t offer node-semver’s loose parsing or version coercion, so partial versions like 1.2 are rejected in the version list.
More tools
- Clean Image: Inspect and remove hidden image metadata
- JWT Decoder: Decode and verify JSON Web Tokens
- Diff Checker: Compare two texts line by line
- JS Runner: Run JavaScript and TypeScript in your browser
- JSON Formatter: Format, validate and minify JSON
- Encode / Decode: Base64, URL, HTML entity and hex
- Hash Generator: MD5, SHA and HMAC of any text
- UUID Generator: Generate UUID v4 and v7 in bulk
- Timestamp Converter: Unix time ↔ human dates
- Regex Tester: Test regular expressions live
- URL Parser: Break a URL into its parts
- HTTP Status Codes: Look up any HTTP status code
- MIME Type Lookup: File extension ↔ MIME type
- Password Generator: Strong random passwords and passphrases
- Random String Generator: Random tokens, IDs and keys
- Slug Generator: Turn titles into URL slugs
- Case Converter: camelCase, snake_case, Title Case and more
- Word Counter: Count words, characters and reading time
- JSON to TypeScript: Generate TypeScript types from JSON
- JSON Diff: Compare two JSON documents structurally
- JSON to SQL: Turn JSON arrays into SQL inserts
- YAML ↔ JSON: Convert between YAML and JSON
- XML ↔ JSON: Convert between XML and JSON
- CSV ↔ JSON: Convert between CSV and JSON
- CSV Viewer: View, sort and filter CSV files
- SQL Formatter: Format and beautify SQL queries
- cURL ↔ Fetch: Convert cURL commands to fetch and back
- Markdown Editor: Write Markdown with a live preview
- Text Cleaner: Remove duplicate lines, empty lines and extra spaces
- Find & Replace: Find and replace in any text
- Cron Expression Builder: Build and explain cron schedules
- User-Agent Parser: Identify browser, OS and device from a user agent
- HTTP Headers Inspector: Paste response headers and get them explained
- JWT Generator: Create and sign test JSON Web Tokens
- Certificate Inspector: Decode PEM certificates and keys
- Meta Tag Inspector: Check a page's SEO and social tags
- UTM Builder: Build campaign URLs with UTM parameters
- URL Cleaner: Strip tracking parameters from links
- Robots.txt Generator: Create and test a robots.txt file
- Sitemap Generator: Create an XML sitemap from a list of URLs
- Image Compressor: Shrink JPEG, WebP and AVIF images in your browser
- Image Resizer: Resize images by pixels, percentage or to fit a box
- Image Converter: Convert between PNG, JPEG, WebP and AVIF
- Image to Base64: Encode images as Base64 data URIs and decode them back
- SVG Optimizer: Minify and sanitize SVG files
- Favicon Generator: Make favicon.ico, Apple and Android icons from an image or emoji
- Color Converter: HEX, RGB, HSL, OKLCH and contrast checks
- Number Base Converter: Binary, octal, decimal, hex and float bits
- IP / CIDR Calculator: Subnets, masks and IP ranges for IPv4 and IPv6
- JSONPath Query: Query JSON with JSONPath expressions
- JSON Schema Validator: Validate JSON against a schema, or generate one
- chmod Calculator: Unix permissions: rwx ↔ octal
- .env Diff: Compare and validate .env files
- TOTP Generator: Generate and verify 2FA codes
- String Escaper: Escape and unescape strings for any language
- Unicode Inspector: See every character, code point and hidden symbol
- Mock Data Generator: Generate realistic fake data
- QR Code Generator: Create QR codes for links, Wi-Fi and contacts
- Lorem Ipsum Generator: Placeholder text in paragraphs, sentences or words
- Date Calculator: Date differences, business days and durations
- Unit Converter: Convert bytes, lengths, weights, temperatures and more
- Query CSV with SQL: Run SQL queries on CSV files
- PDF Merge & Split: Merge, split, reorder and rotate PDFs
- PDF Metadata Cleaner: See and remove hidden PDF metadata
- Office Metadata Cleaner: Remove author and revision data from Word, Excel and PowerPoint
- Images to PDF: Combine images into one PDF
- Image Editor: Crop, rotate, resize and adjust images
- Encrypt / Decrypt Text: Encrypt text with a passphrase (AES-GCM)
- SSH Key Generator: Generate Ed25519 and RSA SSH keys locally
- Email Header Analyzer: Trace an email's path and check SPF, DKIM and DMARC
- JSON to Code: Generate Go, Python, Rust, Java, C# and Kotlin models from JSON
- docker run ↔ Compose: Convert docker run commands to docker-compose and back
- Color Palette Extractor: Pull the dominant colours out of any image
- Password Strength Checker: How long would your password take to crack?
- SPF / DKIM / DMARC Checker: Validate and explain email DNS records
- Kubernetes YAML Checker: Validate and explain Kubernetes manifests
- .gitignore Generator: Build a .gitignore from presets
- CSP Builder: Build and check a Content-Security-Policy
- JSON-LD Generator: Create schema.org structured data
- Open Graph Image Generator: Make 1200×630 social preview images
- CSS Generator: Gradients, shadows, clamp() and more
- Time Zone Meeting Planner: Find meeting times across time zones