Semver Tools (Parser, Comparator, Bumper)
Working with npm, Cargo, Go modules, or any package ecosystem means staring at semantic version strings — and getting them wrong (treating 1.10.0 as less than 1.9.0, missing a prerelease tag) is the kind of mistake that wastes hours. This tool parses two versions into their components (major, minor, patch, prerelease, build), compares them according to the official semver.org spec including correct prerelease ordering, and offers one-click bump buttons for each. Below that, the range expander turns the most common npm range syntax (^1.2.3, ~1.2.3, ~1.2, ^0.x.y for unstable APIs) into the explicit ≥lower <upper bounds — copy them straight into a comparator-style constraint when a tool only accepts those.
Comparison
B is greater than A
Matches
≥ 1.2.3·< 2.0.0How to use
- Type a version in each input (Version A and Version B); the parsed components and comparison update live.
- Click a bump button (Major / Minor / Patch / Prerelease) under either version to advance it — useful for planning a release.
- In the range expander, type a range like ^1.2.3 or ~1.2 — the lower and upper bounds appear; click Copy to grab the ≥a.b.c <x.y.z string.
Frequently asked questions
- How does prerelease ordering work?
- Per spec, a version with a prerelease (1.0.0-alpha) is less than the same version without (1.0.0). Within prereleases, identifiers are compared left to right: numeric identifiers compare numerically, alphanumeric ones lexically, and numeric always ranks lower than alphanumeric at the same position. So 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0.
- Why does ^0.2.3 expand to <0.3.0, not <1.0.0?
- Caret in npm is special-cased for 0.x.y because pre-1.0 APIs are unstable: a bump in 0.x is treated as breaking. So ^0.2.3 only matches 0.2.x, and ^0.0.3 only matches 0.0.3 exactly. This is the same behavior npm itself uses.
- Does build metadata affect comparisons?
- No — per spec, +build metadata is informational only and is ignored when comparing versions. 1.0.0+abc and 1.0.0+xyz are equal.
- What range syntaxes are supported here?
- The expander handles ^x[.y[.z]], ~x[.y[.z]], and bare x or x.y (which behave like ~x and ~x.y respectively). Combined ranges like '>=1.0.0 <2.0.0' or wildcards like '1.x' are not expanded — you can still parse each version separately though.
Related tools
Unit Price Comparator
Compare grocery and shopping items by price-per-unit (price per gram, mL, or piece). Mass, volume, and count groups with imperial and metric units.
List Compare — Intersection, Union & Difference
Compare two lists line by line: find common items, items unique to each, union or symmetric difference — in your browser.
UUID Inspector (Version, Variant, Time)
Paste any UUID to see its version (1–8), variant, and — for time-based v1, v6, and v7 — the embedded creation timestamp, clock sequence, and node/MAC, all decoded in your browser.
Conventional Commit Message Builder
Build a Conventional Commits message with type, scope, breaking change, and footers, in your browser.
JSON Patch Builder (RFC 6902)
Generate an RFC 6902 JSON Patch from a source/target pair, or apply an existing patch to a document. Supports add, remove, replace, move, copy, test ops.
JSON Diff
Compare two JSON documents structurally — see exactly which keys were added, removed, or changed.