Bug Days

JSON Diff — Compare JSON Online

Compare API responses and config files. Match records by ID, keep numeric digits exact, and share a comparison your teammate can reopen.

Local processing · up to 10 MiB per file · try the sample to start

Drop a local JSON file here.

Drop a local JSON file here.

Match records by ID & ignore fields

Pairs records by this field, even when reordered. Applies to every object array; primitive arrays keep the ordering option above.

One pointer per line; field names can be comma-separated. Names apply at every depth; /pointers target exact source paths. No wildcards. Ignoring does not redact shared inputs.

Need to check an API contract? JSON Schema Doctor validates required fields, types, enums, and nested rules. Try a four-error example →

Compare JSON by structure, values, and paths

A text diff may show an entire response as changed because indentation or key order changed. This JSON diff checker parses both documents and compares their values. It reports added, removed, and modified properties, including changes inside nested objects and arrays. Use it to compare API responses, review a JSON configuration change, or investigate a webhook payload.

Paste the two documents, choose how to handle ordering, and select Compare JSON. The highlighted views show each version, while the Changes Report names the path and its old or new value. Swap reverses the comparison, so additions become removals.

JSON comparison example: configuration and reordered arrays

Original configuration

{
  "service": {
    "name": "catalog",
    "timeout": 15
  },
  "regions": [
    "us",
    "eu"
  ],
  "enabled": true
}

Modified configuration

{
  "service": {
    "name": "catalog",
    "timeout": 30
  },
  "regions": [
    "eu",
    "us"
  ],
  "enabled": true,
  "retries": 3
}

Synthetic data. These links contain the example and settings; no stored share is needed.

With default settings, service.timeout changes from 15 to 30, retries is added, and the two region positions change. Enable Ignore array order and the region list matches, leaving two differences. Both links open the example with the relevant comparison settings.

Ignore JSON key order

Object members are unordered in the JSON specification. With Ignore key order enabled, {"a":1,"b":2} and {"b":2,"a":1} compare as equal. Whitespace never changes the structural result. Disable the option if parsed property order is relevant to your review; use Text Diff when exact lines, indentation, or numeric spelling matter.

Compare JSON arrays with or without order

Arrays compare by index by default: [1,2] differs from [2,1]. Choose Ignore array order for collections where positions are irrelevant, such as supported regions. Nested objects match by their values and duplicate counts are preserved: [1,1,2] still differs from [1,2,2]. This option matches whole items recursively; unmatched items appear as additions and removals. Keep order enabled for rankings, coordinates, and event sequences.

Match JSON arrays by ID and ignore changing timestamps

Open Match records by ID & ignore fields and set Array identity field to id or sku. Reordered objects now pair by that field, so a status change is one modification rather than a removed record and an added record. Every object array needs that unique field on each record; duplicate or missing IDs produce a clear error. Primitive arrays keep the ordering setting.

Ignore a field name such as updatedAt at every depth, or an exact JSON Pointer such as /meta/requestId. Use one pointer per line; field names can be comma-separated. Wildcards are not supported. Pointers refer to the indexes in each original input, before ID matching. Ignored fields remain in the documents and share links: filtering is not redaction.

Try the two-change ID-matching example ↗ and read how to compare JSON arrays by ID and ignore fields.

Read meaningful changes, including null and type differences

A missing field differs from a present field set to null. Adding email: null is an addition; changing an existing email to null is a modification. The number 1 differs from the string "1", and an object differs from an array even if they look similar. Paths such as orders[0].status tell you where to investigate.

Numbers compare as exact decimal values: 1 and 1.0 match, but 9007199254740993 and 9007199254740994 differ. Previews, value copy, formatting, and exports keep original number tokens. Duplicate object keys are rejected rather than silently keeping the last value. Use the JSON formatter and validator to inspect ambiguous input or understand numeric precision.

Export a JSON diff report or generate JSON Patch

Select a changed path to copy its complete old or new value, copy a JSON Pointer, or jump to the original input. Filter the Changes Report by path; 50 changes display at a time. Download report includes all changes and comparison settings, even for an equal result.

Download JSON Patch generates RFC 6902 add, remove, and replace operations from the original to the modified document. It is available with key order ignored, positional arrays, and no ignored fields. Other modes intentionally do not describe a whole-document transformation. This is a structural patch, not a byte-for-byte formatting patch.

Processing runs in a cancellable local worker. Each input supports up to 10 MiB, 128 nesting levels, and 600,000 tokens. Reports support up to 5,000 changes. Large previews are limited to keep the page responsive; the full input, changes, exact copy, and exports remain available. Exceeding a comparison limit reports an error, never a partial result as complete.

Share a reproducible API response comparison

Select Share comparison to include both documents and the ordering options. A reader can reopen the comparison instead of reconstructing it from a screenshot. The embedded-data link carries the example in its URL fragment; optional short links store it for 30 days. Replace tokens, customer details, and private values before sharing.

For a focused debugging workflow, read how to compare API responses and handle array order. When the input comes from a request, the REST API client can help capture a response; the JSON formatting guide explains syntax errors and copied tree paths.

Preparing for a backend or API interview? Synapticz offers adaptive practice quizzes with spaced repetition, so topics such as JSON Patch, JSON Pointer and API versioning stay with you after the first read.

Frequently asked questions

How do I compare two JSON files online?

Copy each file’s contents into Original JSON and Modified JSON, then select Compare JSON. The result lists added, removed, and changed values with their paths, alongside highlighted versions of both documents.

Does a JSON diff ignore whitespace and object key order?

Formatting whitespace does not affect the structural comparison. Ignore key order is enabled by default. Disable it to report changes in the parsed property order; use Text Diff to compare exact source formatting.

How can I compare JSON arrays by ID or ignore array order?

Use the optional Array identity field, such as id or sku, to pair objects and compare their fields even when reordered. Every record needs a unique string, number, or boolean identity. Primitive arrays retain the ordering option. Ignore array order instead matches whole values and preserves duplicate counts.

Can I ignore fields and export JSON Patch without rounding numbers?

Yes. Ignore field names at every depth or exact JSON Pointers, one per line. Numbers compare as exact decimal values, so long IDs and small decimal changes remain distinct; 1 and 1.0 are equal. Duplicate object keys are rejected as ambiguous. Export an exact-value report for any comparison; RFC 6902 JSON Patch is available with positional arrays, key order ignored, and no ignored fields.

Can I share a JSON comparison with a teammate?

Yes. Share comparison includes both inputs, comparison options, and the Compare action so the result can be reproduced. Processing is local; optional short links store the shared data. Remove credentials and personal values before making a shareable example.