Compare JSON Files Online (Free & Fast)

Compare two JSON inputs and see exactly what changed. Paste old and new, get a structured field-level report.

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Compare these JSON inputs and return a report of changed, added, and removed fi...

{
"plan": "pro",
"features": {
"aiDraft": true,
"history": true,
"apiAccess": true
},
"limits": {
"documents": 100
}
}
Output
1{
2 "changed": [
3 {
4 "kind": "changed",
5 "path": "plan",
6 "before": "starter",
7 "after": "pro"
8 },
9 {
10 "kind": "changed",
11 "path": "features.aiDraft",
12 "before": false,
13 "after": true
14 },
15 {
16 "kind": "changed",
17 "path": "limits.documents",
18 "before": 10,
19 "after": 100
20 }
21 ],
22 "added": [
23 {
24 "kind": "added",
25 "path": "features.apiAccess",
26 "value": true
27 }
28 ],
29 "removed": [
30 {
31 "kind": "removed",
32 "path": "features.legacyExport",
33 "value": true
34 }
35 ]
36}

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses before and after deploys
  • Config snapshots and feature-flag exports
  • Nested objects and arrays

Example: input → output

What is a JSON diff tool?

A JSON diff tool compares two JSON objects and shows exactly what changed between them. Instead of manually scanning nested data, it highlights differences such as added fields, removed keys, and modified values.

This is especially useful when working with APIs, configuration files, or versioned data structures.

How to compare JSON files online

To compare two JSON files:

  1. Paste your original JSON into the first input.
  2. Paste the updated JSON into the second input.
  3. Run the comparison.
  4. Review the structured diff output.

The tool detects:

  • changed values
  • added fields
  • removed fields

All results are shown with exact paths like features.apiAccess.

JSON diff example

Input
Old JSON: { "plan": "free", "active": true }
New JSON: { "plan": "pro", "active": true, "seats": 3 }

Output
Changed: $.plan from "free" to "pro"
Added: $.seats with value 3

For example, if your API response changes:

  • "plan": "starter" to "plan": "pro"
  • "features.aiDraft": false to true

The tool will highlight each change clearly in a structured format.

Common use cases of JSON diff

Developers use JSON diff tools for:

  • Debugging API changes after deployments
  • Comparing configuration files
  • Tracking feature flag updates
  • Validating data transformations
  • Reviewing version differences

Why structured JSON diff matters

Traditional text diff tools fail with JSON because:

  • order may not matter
  • nested structures are complex

A structured JSON diff understands:

  • object hierarchy
  • array differences
  • field-level changes

This makes debugging faster and more reliable.

JSON diff for APIs

API responses and configuration exports often contain nested objects, arrays, feature flags, limits, user settings, and generated metadata. A visual text diff can make those files look noisy because indentation, formatting, and key order may change even when the real data change is small. A JSON-aware comparison focuses on the fields that code actually consumes.

For API response comparison, paste the previous response on one side and the new response on the other. The diff report helps you catch removed fields, changed values, new keys, and contract drift before client code, analytics jobs, or webhook handlers break. For configuration files, the same workflow helps you review feature flag updates, environment differences, package exports, and deployment settings before release.

JSON diff vs text diff

A text diff compares characters and lines. That works well for source code, markdown, and files where exact formatting matters. JSON is different because the same data can be minified, pretty-printed, sorted, or generated in a different order without changing what the payload means.

A JSON diff compares parsed values. It understands object hierarchy, nested paths, arrays, field names, and primitive values. That means the report can say features.apiAccess was added or plan changed from starter to pro, instead of forcing you to scan a large block of braces and indentation.

Use text diff when you care about exact bytes. Use structured JSON diff when you care about API contracts, config values, feature flags, nested records, and changed fields.

Common errors when comparing JSON

  • Invalid JSON. Both inputs must parse before they can be compared. Use JSON Validator first if a quote, comma, or bracket looks wrong.
  • Formatting-only differences. If one side is minified and the other is formatted, clean both sides with JSON Formatter before comparing.
  • Unstable API fields. Timestamps, request IDs, signatures, and trace IDs can create noisy diffs. Remove or extract stable fields first.
  • Array order changes. If order does not matter in your data, sort or normalize arrays before comparing.
  • Very deep payloads. Deeply nested objects can produce long reports. Use Flatten JSON when path-by-path review is easier.

Why use this JSON diff tool

ForgeJSON is built around repeatable JSON workflows, not just one-off text comparison. The diff tool runs in the browser, works with nested objects and arrays, and fits into a larger flow of validation, formatting, cleanup, flattening, conversion, and pipeline automation.

That matters when comparison is only one step. You may validate JSON first, format both sides, compare changes, extract affected fields, then export the review to CSV. Keeping those steps connected gives the page stronger topical coverage and gives users a natural next action after the diff.

When working with JSON data, it is often helpful to validate, format, or transform your data before comparing differences. These tools can improve accuracy and make debugging easier.

  • JSON Validator - validate JSON structure before running a comparison.
  • JSON Formatter - format and clean JSON for better readability during diffing.
  • JSON to CSV Converter - export JSON data into spreadsheet format after reviewing changes.
  • JSON Pipeline - automate JSON transformations and comparisons in workflows.
  • Clean JSON - remove noise and unnecessary fields before comparison.
  • Flatten JSON - convert nested objects into flat key paths for easier analysis.

For reusable automation, the JSON Pipeline Builder can turn comparison, validation, cleanup, extraction, and export into a repeatable workflow instead of a one-off browser task.

Automate JSON comparison

When the same comparison happens often, turn the workflow into a repeatable JSON pipeline. You can validate both inputs, format or clean noisy fields, compare the structured output, and export the result without rebuilding the process every time.

This is useful for API release checks, config reviews, webhook payload audits, and recurring data transformation tests.

Example pipeline on GitHub

The ForgeJSON Pipeline Spec repo includes a portable JSON diff pipeline you can inspect, copy, or version with your own tooling:

The example is a plain JSON pipeline document with a before-and-after account payload and a structured diff report step.

Frequently asked questions

What is a JSON diff tool?+

A JSON diff tool compares two JSON objects or files and shows which fields were added, removed, or changed. It reports differences by structured path instead of only showing raw text changes.

How do I compare two JSON files?+

Paste the original JSON into the first input, paste the updated JSON into the second input, run the comparison, and review the structured diff output for changed values, added fields, and removed fields.

How does this JSON diff tool work?+

Paste your old JSON on one side and the new JSON on the other. The tool walks both inputs key by key — including nested objects and arrays — and returns a structured report listing every added, removed, and changed field, each with its path and old/new values.

Is this JSON diff tool free?+

Yes. The JSON diff tool is free to use in your browser, with no signup required for basic comparison.

Is the comparison done locally?+

Yes. The diff runs entirely in your browser. Your JSON is never uploaded to a server, and there is no signup or rate limit.

How is this different from git diff?+

git diff compares raw text, so reordered keys, whitespace changes, and trailing commas all show up as differences. A JSON-aware diff parses both inputs into structures first, so it ignores formatting noise and only reports semantic changes — the values at each path.

Does it handle nested JSON?+

Yes. The diff descends into every nested object and array. For deeply nested payloads, the report is easier to scan if you flatten the inputs first so paths become dotted strings like user.address.zip instead of nested trees.

Can it compare large JSON files?+

There is no hard size limit. If both inputs fit in browser memory, the diff runs. Multi-megabyte payloads work; very large arrays may take a few seconds before the report renders.

Common next steps

Related tools

Related comparisons

Read more on the blog

Advanced usage (optional)

JSON Diff / Change Report

v1.0.0
Compare
objectarray

Description

JSON Diff / Change Report

Compare two JSON inputs and output a structured report or focused diff subset. Accepts a primary input (the new JSON) and secondary input (the old JSON), then shows what changed, was added, or was removed between them.

How It Works

This utility requires two inputs — primary (the "new" version) and secondary (the "old" version). It performs a deep comparison and outputs results based on the selected mode.

Diff Modes

Report

Return a structured report with changed, added, and removed arrays. Entries include dot paths, kind, and either before/after values or the added/removed value.

Changed Only

Return the subset of the new JSON that differs from the old JSON. Modified and added fields are included; removed fields are excluded because they do not exist in the new JSON.

Added Only

Show only fields that exist in the primary input but not in the secondary. Useful for detecting new additions.

Removed Only

Show only fields that exist in the secondary input but not in the primary. Useful for detecting deletions.

Full Annotated

Show all fields with _diff_ markers indicating their status: "unchanged", "changed", "added", or "removed". Provides a complete picture of all differences.

Configuration

FieldTypeDefaultDescription
Diff Modeenumreportreport, changed-only, added-only, removed-only, or full-annotated

Use Cases

Version Comparison

  • Config changes: Compare two versions of a configuration file to see what changed
  • API responses: Diff API responses before and after a deployment
  • Schema evolution: Identify added or removed fields between schema versions

Data Validation

  • Migration verification: Compare source and target data after migration
  • Sync detection: Find out-of-sync records between two data sources
  • Audit trail: Track exactly which fields were modified in an update

Debugging

  • State inspection: Compare application state before and after an action
  • Response diffing: Compare expected vs. actual API responses
  • Regression detection: Identify unexpected changes in output data

Configuration

NameTypeDefaultDescription
Diff Modeenumreportreport: return changed, added, and removed entries with paths. changed-only: show the new JSON subset with modified and added values. added-only: show only new keys. removed-only: show only deleted keys. full-annotated: show all with _diff markers. report changed-only added-only removed-only full-annotated

Examples

AI Prompt
Compare these JSON inputs and return a report of changed, added, and removed fields.
{
"plan": "pro",
"features": {
"aiDraft": true,
"history": true,
"apiAccess": true
},
"limits": {
"documents": 100
}
}
Output
1{
2 "changed": [
3 {
4 "kind": "changed",
5 "path": "plan",
6 "before": "starter",
7 "after": "pro"
8 },
9 {
10 "kind": "changed",
11 "path": "features.aiDraft",
12 "before": false,
13 "after": true
14 },
15 {
16 "kind": "changed",
17 "path": "limits.documents",
18 "before": 10,
19 "after": 100
20 }
21 ],
22 "added": [
23 {
24 "kind": "added",
25 "path": "features.apiAccess",
26 "value": true
27 }
28 ],
29 "removed": [
30 {
31 "kind": "removed",
32 "path": "features.legacyExport",
33 "value": true
34 }
35 ]
36}
Config
Diff Mode
report

API Usage

POST /api/v1/utilities/compare.json-diff
Example:
curl -X POST https://your-domain.com/api/v1/utilities/compare.json-diff \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":{"plan":"pro","features":{"aiDraft":true,"history":true,"apiAccess":true},"limits":{"documents":100}},"secondary":{"plan":"starter","features":{"aiDraft":false,"history":true,"legacyExport":true},"limits":{"documents":10}}},"config":{"mode":"report"}}'
Response
1{
2 "changed": [
3 {
4 "kind": "changed",
5 "path": "plan",
6 "before": "starter",
7 "after": "pro"
8 },
9 {
10 "kind": "changed",
11 "path": "features.aiDraft",
12 "before": false,
13 "after": true
14 },
15 {
16 "kind": "changed",
17 "path": "limits.documents",
18 "before": 10,
19 "after": 100
20 }
21 ],
22 "added": [
23 {
24 "kind": "added",
25 "path": "features.apiAccess",
26 "value": true
27 }
28 ],
29 "removed": [
30 {
31 "kind": "removed",
32 "path": "features.legacyExport",
33 "value": true
34 }
35 ]
36}