Semver Comparator
Enter two semantic version strings (e.g. 1.4.2 and 2.0.0-beta.1) and this tool compares them field by field — major, minor, patch, then prerelease identifiers — exactly as the Semantic Versioning 2.0.0 specification defines precedence, so you always know which release is newer.
How precedence is determined
Versions are compared by major, minor, and patch number first — the first difference decides. If those three numbers are identical, a version without a prerelease tag (like 1.0.0) always outranks one with a prerelease tag (like 1.0.0-alpha). If both have prerelease tags, each dot-separated identifier is compared in turn: numeric identifiers compare numerically, alphanumeric ones compare as plain text, and a numeric identifier always ranks lower than an alphanumeric one.
Tip
Build metadata after a + (like +build.5) is parsed but never affects the comparison — per the spec, two versions that differ only in build metadata are considered equal in precedence.
What counts as valid semver?
A valid version has exactly three dot-separated numbers (major.minor.patch), optionally followed by a prerelease tag after a hyphen and build metadata after a plus, e.g. 1.2.3-rc.1+20231001. Leading zeros, missing segments, or extra dots anywhere else make a version invalid.
More tools in this category
Regex Tester
Test regular expressions against sample text with live match highlighting.
Cron Expression Parser
Parse a 5-field cron expression into a plain-language schedule and see its next run times.
Text Encoding Converter
Convert text to UTF-8 hex, binary, code points, Base64, URL encoding and HTML entities at once.
Password Generator
Generate strong, random passwords instantly, right in your browser.
JSON Formatter & Validator
Format, validate, and minify JSON instantly in your browser.
UUID Generator
Generate random, RFC 4122 version 4 UUIDs instantly in your browser.
JWT Decoder
Decode and inspect JSON Web Tokens (JWTs) instantly in your browser.
Diff Checker
Compare two blocks of text and instantly see every line that was added or removed.
Slug Generator
Turn any text into a clean, URL-friendly slug in real time.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly.
Unix Timestamp Converter
Convert Unix timestamps to dates and dates to Unix timestamps, live.
Hash Generator
Generate SHA-1, SHA-256, and SHA-512 hash digests from any text, right in your browser.
Box Shadow Generator
Design a CSS box-shadow visually with live sliders and a color picker, then copy the generated declaration.
Cron Expression Builder
Build a valid 5-field cron expression from a friendly form — no need to memorize the syntax.
Lorem Ipsum Generator
Generate placeholder Lorem Ipsum text by paragraphs, sentences, or words for mockups and layouts.
Markdown Previewer
Write Markdown on the left and see the rendered HTML update live on the right.
IP Subnet Calculator
Enter an IPv4 address in CIDR notation and get its network, mask, broadcast, and host range.
HTTP Status Code Lookup
Look up any HTTP status code and see its standard meaning in plain English.
SQL Formatter
Pretty-print minified or messy SQL into readable, indented statements.
Image to Base64 Converter
Convert an image into a Base64 data URI you can paste straight into HTML, CSS, or JSON — entirely in your browser.