EditSafely

Compare Two JSON Files

Diff two JSON files and show the differences visually.

Runs on your device, nothing uploaded

Show
Try:

0 chars · 0 lines

0 chars

Output

Diff two JSON files and show the differences visually.

Type or paste above to see the result here.

Example: Diff two config files

What you paste never leaves this tab

Compare Two JSON Files is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, an API response with live access tokens in it is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.

  • No upload
  • No length limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Compare Two JSON Files

  1. 1. Paste the two versions. Paste the original JSON into Original and the new one into Changed, or use Open on each pane to load a file. The Swap button exchanges them.
  2. 2. Read the differences by path. Differences by path lists each changed value once, like $.address.city going from London to Cambridge, with counts of changed, added and removed values on top. Key order never counts as a change here. Tap a path or value to copy it.
  3. 3. Or compare line by line. Choose Line by line to see both documents formatted, with lines only in the original marked with a minus and new lines with a plus. There, Ignore key order decides whether reordered keys count as changes.

When to use Compare Two JSON Files

Compare Two JSON Files is for spotting exactly what changed between two versions of a JSON document. It handles the parsing and alignment so you see meaningful additions and removals instead of a wall of text that changed because a comma moved.

  • Checking config drift. You suspect a saved deployment config no longer matches the template it was generated from. Paste or open both and see precisely which settings were edited or added.
  • Reviewing an API response after a deploy. You captured a response before and after shipping a change and want to confirm nothing unexpected shifted. Compare the two captures and check the diff against your intended change.
  • Auditing a package-lock.json update. A dependency bump touched a large lockfile and you want to see which entries actually changed rather than scrolling through thousands of unchanged lines by hand.
  • Verifying environment parity. Staging and production each have their own config file and you want to confirm they only differ in the fields that are supposed to differ, like hostnames or feature flags.

Examples

Diff two config files

Input

{"name": "Ada", "age": 36, "city": "London"}

Output

2 changed · 1 added

$.age: 36 → 37
$.city: "London" → "Cambridge"
$.active: added true

About the Compare Two JSON Files tool

Compare Two JSON Files is a free online tool that works entirely inside your web browser. Diff two JSON files and show the differences visually. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 90 JSON utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with 2 settings, including Ignore key order and Show, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every step is handled on your own machine rather than by a remote API.

Frequently asked questions

Is Compare Two JSON Files free to use?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How much text can I process at once?

There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

Can I save what the tool produces?

Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.

Related tools

All JSON Tools →