DevLab
{}
JSON⭐ Popularintermediate

OpenAPI Diff Checker

compare two OpenAPI specs and detect breaking changes

By Bikram NathLast updated

The OpenAPI Diff Checker compares two OpenAPI (Swagger) specification files and shows exactly what changed between versions — added endpoints, removed parameters, modified response schemas, and breaking changes. Paste two OpenAPI 3.x JSON or YAML specs and get a color-coded diff highlighting additions, removals, and modifications with breaking-change warnings. Runs entirely client-side with no server upload.

Try it now — free, instant, no signup

What is OpenAPI Diff Checker?

An OpenAPI diff checker takes two versions of an API specification and produces a structured comparison showing every change at the endpoint, parameter, request body, and response level. Unlike a generic text diff, it understands OpenAPI semantics — it knows that removing a required request parameter is a breaking change, while adding an optional one is not.

API versioning is one of the hardest coordination problems in software engineering. A backend team ships v2 of their spec, and frontend, mobile, QA, and partner teams all need to know exactly what changed and whether their existing integrations will break. Reading a 3,000-line YAML diff in GitHub is impractical. A semantic diff tool surfaces the 12 meaningful changes buried in 200 lines of reformatting noise.

This tool parses both specs into their component parts — paths, operations, parameters, schemas, security requirements — and compares them structurally. It flags breaking changes (removed endpoints, narrowed response types, new required fields) separately from non-breaking additions (new optional parameters, expanded enum values, added endpoints). The output is a prioritized changelog that teams can review in minutes instead of hours.

When to use OpenAPI Diff Checker

Review what changed between two API versions before approving a pull request that modifies your OpenAPI spec file.
Generate a breaking-changes report for partner teams consuming your API so they know exactly which integrations need updating.
Audit a third-party API spec update (e.g., Stripe, Twilio) against the version your code was built against to catch silent breaking changes.

Expert Notes

Not all OpenAPI changes are equal — adding a required request parameter or removing a response field are breaking changes, while adding optional fields is typically backwards-compatible. Tools that categorize changes as breaking vs non-breaking (like `oasdiff`) are more useful than plain diffs because they encode the semantics of the API contract. When comparing specs between versions, always diff the resolved schema (with `$ref`s inlined) rather than the raw YAML, since a change in a shared component can break dozens of endpoints without touching them directly.

DevLab's Take

Essential during API versioning decisions — paste two spec versions, see what broke, and decide whether you need a new major version. For automated breakage detection in CI, `oasdiff` as a GitHub Action is a more robust long-term solution.

Frequently Asked Questions

What OpenAPI versions does it support?
The checker supports OpenAPI 3.0.x and 3.1.x specifications in both JSON and YAML format. Swagger 2.0 specs are not directly supported — convert them to OpenAPI 3.x first using the official swagger-converter tool or swagger2openapi npm package. The tool validates both specs before diffing and will show parse errors if either spec is malformed.
How does it detect breaking changes?
Breaking changes are identified using standard API compatibility rules: removing an endpoint or HTTP method, adding a required request parameter or header, narrowing a response schema (removing a field clients may depend on), changing a parameter type, or restricting enum values. Each breaking change is flagged with a red warning icon and explanation of why it breaks backward compatibility.
Can I compare specs from different files or URLs?
You paste the spec content directly into the two input panels. If your specs are hosted at URLs, fetch them first (curl, browser, or the Fetch API) and paste the content. The tool does not fetch remote URLs to avoid CORS issues and to keep your spec data entirely local.
Does it handle references?
Yes. Internal references (pointing to #/components/schemas/...) are resolved before comparison, so the diff shows the actual schema differences rather than just a changed reference path. External file references are not resolved — inline them before pasting if your spec uses multi-file .
What is the difference between this and a regular text diff?
A text diff compares line by line and shows every whitespace change, key reordering, and formatting difference as a "change." An OpenAPI semantic diff compares the API structure — it ignores key ordering, normalizes formatting, and groups changes by endpoint and operation. This means adding a newline or reordering properties does not show up as a change, but adding a query parameter does.

Related Tools