Two journeys, one shared future. Your contribution helps my daughter pursue higher education and helps me continue creating thoughtful, accessible open-source tools—free for everyone to use.

Compare JSON / YAML online

JSON & YAML
Diff Checker

Compare JSON or YAML files with live highlights for added, removed, and changed values. Match arrays and Kubernetes resources, then export a clear report. Your data stays in your browser.

01 / Compare

Spot the difference.

Browser only · No uploads

Find added, removed, and changed fields in an API response while ignoring object key order.

Ready to compare + 0 added − 0 removed ~ 0 changed
No changes
Differences are highlighted directly in your inputs.

Highlighted lines show changed fields; brighter text marks the edited values. Use Next / Previous or Alt + ↓ / ↑ to jump between changes. Input stays editable.

01

Original

Ready for inputTab: indent · Shift+Tab: leave
02

Updated

Ready for inputTab: indent · Shift+Tab: leave

Object key order, indentation, and YAML comments are ignored. Array positions matter. Ctrl/⌘ + Enter compares.

Ready to compare

Paste two documents, then choose Compare documents.

02 / Review

A clear view of what changed.

—Total changes
—+ Added
—− Removed
—~ Changed
Result layout

Review − original and + updated values. Highlighted text pinpoints edits. Reports include all changes; paths use JSON Pointer escaping.

Field changes− Original+ Updated

Your comparison will appear here.

03 / How to compare

Compare data.
Understand the change.

01

Paste or open two files

Place your original JSON or YAML on the left and the updated version on the right. Compare JSON to YAML directly. Choose the format explicitly for ambiguous YAML flow syntax or scalar values.

02

Choose how items match

Compare arrays by position, ignore their order, or match object arrays by a unique field such as id or name. Kubernetes identity matches resources across reordered YAML documents.

03

Review and export

See differences highlighted in your inputs as you type. Jump between changes with Next / Previous, or review the detailed results below. Copy or download the complete JSON report. Nothing is uploaded or saved between visits.

04 / Worked examples

JSON and YAML diff examples.

Compare an API response or a configuration file. Each pair below produces two changes; object key order and YAML comments do not create extra differences. The sample picker includes five JSON, five YAML, and five Kubernetes scenarios, with matching options applied automatically when you load an example.

Original JSON

Before the API update

{
  "service": "catalog-api",
  "replicas": 2
}
Updated JSON

A changed value and a new field

{
  "replicas": 3,
  "service": "catalog-api",
  "debug": false
}

JSON result: /replicas changes from 2 to 3, and /debug is added. Moving service creates no change.

Original YAML

Before the configuration update

# Current release
service:
  name: catalog-api
  replicas: 2
  image: catalog:1.0
Updated YAML

Compare values across reordered keys

# Next release
service:
  image: catalog:1.1
  name: catalog-api
  replicas: 3

YAML result: /service/image and /service/replicas change. The comment and key order are ignored.

05 / Common questions

JSON and YAML comparison, explained.

Use this checker for API responses, Helm values, Docker Compose configuration, and Kubernetes manifest reviews.

What is a structural JSON diff?

A structural diff compares parsed values and reports the fields that were added, removed, or changed. It ignores formatting and object key order. A number such as 3 differs from the string "3"; a missing field differs from a field containing null. Added and removed objects count as one change at their parent path.

Can I compare as I type and use keyboard shortcuts?

Yes. “Compare as I type” refreshes the highlights after a short pause. Switch it off for manual comparison. Press Ctrl/⌘ + Enter to compare, and Alt + ↓/↑ to move between changes. Tab inserts two spaces in an editor; Shift+Tab leaves it. “Show in inputs” links each detailed result back to its source.

Can I compare YAML files or JSON against YAML?

Yes. Each input has its own format selector. JSON-compatible YAML values, anchors, aliases, and multi-document streams are supported. YAML comments, quoting style, and whitespace are not compared. Dates remain strings; custom tags and recursive aliases are rejected. When an alias inherits a changed value, its reference is highlighted alongside the anchor. For a formatting-only review, use your editor’s text diff. Use the YAML & JSON Formatter to convert or validate a single document.

How does ignoring array order work?

Items match by their complete value, including nested arrays compared without order. Duplicate counts are preserved: [1, 1] differs from [1]. Editing an item produces a removal and an addition in this mode. To track field edits within object arrays, choose “Match objects by field” and enter a unique direct field name. Object arrays require that field on every item; primitive and mixed arrays still compare by position.

How do I compare Kubernetes YAML manifests?

Choose Kubernetes identity to match resources by apiVersion, kind, metadata.namespace, and metadata.name. Paste multi-document YAML or a JSON array of resources. Duplicate identities are rejected. Missing namespaces remain distinct from an explicit default namespace, and server-generated fields are included. This is an offline file comparison, not a live cluster diff. You can create drafts with the Kubernetes Manifest Builder or Helm Chart Builder.

How do I read the field paths?

Normal paths use JSON Pointer notation: /service/ports/0 identifies the first port. A literal ~ in a key is escaped as ~0, and a slash as ~1. An empty path denotes the root value. Multi-document comparisons add a /documents/0 prefix. Matched arrays and Kubernetes resources use descriptive identity segments instead of indexes; these paths are report labels and cannot be used as JSON Patch operations.

Is this JSON diff checker private and free?

Yes. Parsing, comparison, file reading, and report creation happen locally. Your input is not uploaded, stored, or placed in a URL. No account is needed. Copying or downloading a report explicitly creates a copy containing the changed values, so review it before sharing.

Are there file size or number precision limits?

Each input is limited to 1 MiB, 80 nesting levels, and 50,000 expanded values. Expanded text is capped at 4 MiB, and reports support up to 2,000 changes. Numbers use JavaScript precision; non-finite values and unsafe integers are rejected. Quote large identifiers or high-precision decimal values to compare them exactly. Duplicate JSON or YAML mapping keys are rejected to avoid hiding overwritten values.