Free · Fast · Privacy-first

Compare JSON Files Online

Comparing raw or minified JSON often produces noisy diffs full of whitespace changes rather than real data differences.

Format JSON first for clean, readable diffs

🔒

Highlights structural and value-level changes

Works with nested and deeply structured JSON

Runs in browser, JSON stays private

Cost
Free forever
Sign-up
Not required
Processing
In your browser
Privacy
Files stay local
FreeNo signupWhite-label

Add this Diff Checker to your website

Drop the Diff Checker into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.

  • Files stay 100% in the visitor's browser
  • Responsive — adapts to any container width
  • Free forever, no API key needed

Embed code

<iframe
  src="https://www.fixtools.io/developer/diff-checker?embed=1"
  width="100%"
  height="780"
  frameborder="0"
  style="border:0;border-radius:16px;max-width:900px;"
  title="Diff Checker by FixTools"
  loading="lazy"
  allow="clipboard-write"
></iframe>

Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.

Getting a Clean JSON Diff Without the Noise

JSON is the dominant format for API responses, configuration files, feature flags, and data exports. When JSON objects are serialised differently, one minified and one pretty-printed, or one with keys in alphabetical order and another preserving insertion order, a naive text diff flags almost every line as changed even when the actual data values are identical. This key-order and whitespace sensitivity is the biggest obstacle to useful JSON comparison. The solution is to normalise both files to identical formatting before diffing: same indentation depth, same key ordering, same quoting style. Once normalised, the diff output reflects only genuine changes in data values, key names, or structure rather than serialisation differences.

FixTools handles JSON comparison most effectively through a two-step process. First, use the JSON Formatter to parse and re-serialise both JSON documents with consistent indentation (typically two or four spaces) and optionally sorted keys. This step removes all whitespace noise and resolves key-ordering differences between the two files. Second, paste both formatted outputs into the Diff Checker panels and run the comparison. The Myers algorithm then operates on semantically normalised text, so every highlighted difference represents a real change in data value, key name, or structural organisation. Nested objects and arrays are compared recursively at the line level, making even deeply nested differences clearly visible in the output.

After you have the diff, pay close attention to value changes inside unchanged-looking keys: these are the most common source of subtle bugs in API integrations and configuration drift. A field name that appears identical can have a changed value type, a changed unit, or a changed default that only becomes visible when you look at the highlighted value on the adjacent line. Use the side-by-side view to compare corresponding nested blocks from each document and confirm that the structural hierarchy is consistent between both versions.

JSON is unambiguous about character encoding: the specification requires UTF-8, UTF-16, or UTF-32, and most production JSON in transit is UTF-8 by default. That means encoding mismatches are rarely the source of false diff positives in practice, unlike with raw text files where CRLF versus LF endings dominate the trouble reports. The line-based Myers diff handles JSON well after formatting because pretty-printed JSON places each key-value pair on its own line, giving the algorithm clean atomic units to align. Performance is excellent up to JSON documents in the low megabytes range; beyond that, splitting the input by top-level array element or by major object section produces both faster diffs and more readable output. Because the comparison runs entirely client-side, JSON payloads containing API keys, customer records, or session tokens are safe to paste, since no part of the document is transmitted off the device or written to durable storage.

It is worth distinguishing semantic JSON diff from textual JSON diff because the two approaches answer different questions. A textual diff like the one FixTools produces operates on the formatted text of the two JSON documents and reports any line-level difference, which means it is sensitive to key order, array order, and number formatting choices like trailing zeros or scientific notation. A semantic JSON diff, by contrast, parses both documents into in-memory trees and compares them structurally, treating key reordering as a non-change and matching array elements by content rather than position. Each model has a place. For verifying that two API responses are byte-identical after deserialisation and reserialisation, the textual approach with the FixTools JSON Formatter applied to both inputs is faster and produces a more readable, line-anchored output that you can save as a PDF. For comparing semantically equivalent documents that differ only in serialisation order, a textual diff requires a pre-processing step. The most effective pre-processing tool is jq, the command-line JSON processor, which can canonicalise documents with jq --sort-keys on both files before pasting. Schema-aware comparison goes further by ignoring fields the schema marks as ephemeral, such as timestamps or nonce values, and is the right model for contract testing against an OpenAPI or JSON Schema definition. For that workflow, generate the canonical form with a schema-aware tool first, then paste the canonical outputs into FixTools for the final readable visual diff that you can share with a non-technical reviewer.

How to use this tool

💡

Paste both JSON objects into the JSON Formatter first to normalise indentation, then bring the formatted output into each panel of the Diff Checker for a clean structural comparison.

How It Works

Step-by-step guide to compare json files online:

  1. 1

    Format both JSON files

    Open the FixTools JSON Formatter and paste each JSON document into it. Click Format to normalise whitespace, indentation, and optionally key order. Repeat for both files so they share identical formatting before you compare them.

  2. 2

    Copy formatted JSON

    Copy the formatted output for each JSON document from the JSON Formatter result panel. Make sure you copy the complete formatted output including all opening and closing braces.

  3. 3

    Paste into Diff Checker panels

    Open the Diff Checker and paste the first formatted JSON into the left panel and the second formatted JSON into the right panel. With both files normalised to the same format, the comparison will show only real data differences.

  4. 4

    Compare

    Click Compare. With consistent formatting applied to both inputs, the diff shows only genuine data and structural differences. Highlighted lines represent real changes in values, key names, or JSON structure rather than serialisation or whitespace differences.

Real-world examples

Common situations where this approach makes a real difference:

API response regression testing

A developer has a saved baseline API response from last week and wants to check whether a backend deployment changed any response fields. After formatting both responses with the JSON Formatter, the Diff Checker highlights two new keys added and one value changed from a string to an integer. These two findings pinpoint the breaking changes that caused a frontend rendering bug, reducing the investigation from hours to minutes.

Feature flag configuration audit

An engineering team stores feature flags as a JSON configuration file checked into the repository. Before a major release, a developer compares the staging JSON config to the production one using the Diff Checker. The output reveals three flags enabled in staging but not production, preventing an accidental partial rollout of incomplete features that would have reached real users.

Package.json dependency comparison

After a team member updates project dependencies, the lead developer wants to verify that only the approved packages changed and no unreviewed dependencies were added. Diffing the old and new package.json files shows exactly which version strings were bumped and confirms that no new dependency entries appeared outside the ones that were discussed and approved in the team review.

Data export consistency check

A data engineer runs the same ETL pipeline twice with different date range parameters and needs to confirm whether the two output JSON files are otherwise identical. Formatting and diffing the two outputs immediately reveals a missing record in the second run caused by an off-by-one error in the date filter, a bug that would have been invisible without a systematic comparison of the two outputs.

Pro tips

Get better results with these expert suggestions:

1

Sort keys before comparing

JSON objects do not have a defined key order, so two semantically identical JSON documents can produce a diff full of apparent changes if keys happen to be in different orders. Use the JSON Formatter's key-sorting option on both files before pasting into the Diff Checker to eliminate all ordering differences completely and ensure the diff shows only genuine data or structural changes.

2

Minify first to check structural equality quickly

If you only need a yes or no answer on whether two JSON files are structurally equal and do not need to see which specific values differ, minify both with the JSON Formatter and compare the resulting single-line outputs. If they are identical, the diff will show nothing. This is a fast sanity check you can run in seconds before committing to a deeper line-by-line review.

3

Compare arrays element by element for large datasets

Large JSON arrays where elements have shifted position produce misleading diffs because the algorithm matches lines sequentially and treats shifted elements as deletions and insertions. Extract individual array elements or sort the array by a stable key field before diffing to get meaningful element-level comparisons rather than a confusing pattern of false positives across the entire array.

4

Use two-space indentation for the most compact readable output

Four-space indentation on deeply nested JSON produces very wide lines that can require horizontal scrolling in the diff panels. Two-space indentation keeps the formatted output compact while still being clearly readable, ensures that nested keys stay visible without scrolling, and produces a diff that is easier to review on screens of any width.

FAQ

Frequently asked questions

Minified or inconsistently indented JSON produces diffs full of whitespace changes that obscure real differences in data. Formatting both files first normalises whitespace and indentation so only actual data changes appear in the diff output. This is especially important for deeply nested JSON where a single indentation change can shift every following line and make a small value change appear to be a wholesale restructuring of the document.
Yes. Processing happens entirely in your browser and handles files limited only by device memory, which is typically hundreds of megabytes on modern hardware. For very large JSON files such as bulk data exports, consider splitting the file into logical sections and comparing each section independently to produce shorter, more manageable diffs that are easier to review thoroughly.
The Diff Checker is text-based rather than semantically JSON-aware. For the best JSON comparison, use the JSON Formatter to normalise both files first, then run the text diff for a clean structural output. This two-step approach produces results that are semantically equivalent to a dedicated JSON diff tool in the vast majority of practical comparison scenarios. If you need true semantic JSON diffing that ignores key order and array order entirely, the practical workflow is to canonicalise both documents using a command-line tool such as jq with the --sort-keys flag, which sorts keys alphabetically and produces deterministic output regardless of how the original JSON was serialised. Schema-aware comparison takes this further by ignoring fields that the schema marks as variable, such as request IDs, timestamps, or nonce values, and is the appropriate model for contract testing against an OpenAPI specification or JSON Schema document. After running either canonicalisation, paste the canonical outputs into FixTools to get the final readable visual diff that you can save as a PDF and share with reviewers.
Not automatically at the diff stage, but by using the JSON Formatter's key-sorting option on both files before diffing, you can eliminate all ordering differences as a pre-processing step. After sorting both files by the same key order, the diff will show only genuine value or structural changes rather than reordering differences that carry no semantic meaning.
No. All processing, including both the formatting step and the diffing step, runs in your browser. Your JSON data never leaves your device. This makes the tool safe for API response payloads that contain authentication data, internal configuration files with environment secrets, and any other JSON content that should not be transmitted to external services.
The text-based diff will treat reordered array elements as changes even if the underlying data is identical, because it compares lines sequentially without understanding JSON semantics. To work around this, sort the arrays by a stable key field before formatting and diffing. For use cases where you need true array-order-independent comparison, a dedicated semantic JSON diff tool is more appropriate than a text diff.
Yes, and this is one of the most common and valuable use cases. Copy the API response from your staging environment and your production environment, format both with the JSON Formatter using the same settings, and paste them into the Diff Checker to see exactly where the two environments return different data. This is particularly useful for catching environment configuration drift before a production deployment.
The most common cause is that you formatted only one file and pasted the other in its raw minified form. The diff then shows the entire minified line as a single change and the actual key-level differences inside it are not visible as discrete lines. Re-run both inputs through the JSON Formatter using identical indentation and key-sorting settings, then paste both formatted outputs. A secondary cause is unescaped control characters in string values that some formatters silently drop; if you suspect this, paste the raw JSON into a validator first to confirm it parses cleanly before formatting and diffing.
For JSON files stored in a Git repository, the canonical workflow is git show commit:path/to/file to extract the file at any commit, piped through your formatter of choice. Paste the formatted output from the older commit into the left panel and the formatted output from the newer commit into the right panel. This gives a readable visual diff that is independent of the Git platform you use and can be saved as a PDF for change-management records. The approach also works for comparing a file in your working tree against the version in HEAD, or for comparing the same configuration file across two branches without a checkout.
Pretty-printed JSON places each key-value pair on its own line, so the diff highlights changes at the granularity of individual properties rather than entire objects. A renamed key appears as a deletion of the old key-value line followed by an addition of the new line. A changed value within the same key appears as a deletion-then-addition pair where only the value portion of the line differs. For deeply nested structures, the indentation in the formatted output makes it clear which level of the hierarchy each change belongs to, and the character-level highlighting within changed lines makes a single modified value obvious even inside a long line.

Related guides

More use-case guides for the same tool:

Ready to get started?

Open the full Diff Checker — free, no account needed, works on any device.

Open Diff Checker →

Free · No account needed · Works on any device