Semver Checker
Validate semantic versions, compare two versions, and check if a version satisfies a range.
Parse Version
Major
2
Minor
3
Patch
1
Pre-release
-
Build
-
Valid semantic version
Compare Versions
<
2.3.1 is older than 2.4.0
Range Check
Does
2.3.1 satisfy this range?Satisfied
^2.0.0 means >=2.0.0 and <3.0.0
Semver Range Reference
| Range | Meaning |
|---|---|
| ^1.2.3 | >=1.2.3 and <2.0.0 (compatible changes) |
| ~1.2.3 | >=1.2.3 and <1.3.0 (patch-level changes) |
| >=1.2.3 | Greater than or equal to 1.2.3 |
| >1.2.3 | Strictly greater than 1.2.3 |
| <=1.2.3 | Less than or equal to 1.2.3 |
| <1.2.3 | Strictly less than 1.2.3 |
| 1.2.3 | Exact match |
Related tools
JSON to TypeScriptCode
Generate TypeScript interfaces or types from JSON input.
JSON to Go StructCode
Generate Go structs from JSON with proper json tags.
JSON to Python DataclassCode
Generate Python dataclass code from JSON with type hints.
JSON to Java POJOCode
Generate Java POJO classes from JSON with getters, setters, and constructors.
JSON to Rust StructCode
Generate Rust structs from JSON with serde derive macros.
JSON to C# ClassesCode
Generate C# classes from JSON with public properties and using statements.
About Semver Checker
Check whether a semantic version satisfies a range, and compare versions to see which is newer. Useful for reasoning about npm-style dependency ranges like ^1.2.0 or ~2.3.x.
How to use
- Enter a version (e.g. 1.4.2) and a range (e.g. ^1.2.0).
- See whether the version satisfies the range.
- Compare two versions to determine ordering.
Frequently asked questions
- What is the difference between ^ and ~?
- ^1.2.3 allows minor and patch updates (<2.0.0), while ~1.2.3 allows only patch updates (<1.3.0).
- How are pre-release versions handled?
- Pre-releases like 1.0.0-beta sort below the final release and only match ranges that explicitly include them.