OpenGPT.in

JSON Diff

Compare two JSON documents and see exactly what changed.

Runs in your browser Runs entirely in your browser. Nothing you put in it ever leaves your device.

Object keys are always compared regardless of order, because JSON objects are unordered by definition. Arrays are ordered, so a moved item is reported as a change unless you turn this on.

Paste or drop the original JSON document. Press Command or Control and Enter to compare.

Paste or drop the changed JSON document. Press Command or Control and Enter to compare.

Ready. Both documents stay in your browser.

Differences

Paste JSON into both boxes and press Compare.

    Was this useful?


    About this tool

    Paste two JSON documents and get a list of what actually differs: which properties were added, which were removed, and which values changed, each with the path you would use to reach it in code. The comparison is structural rather than line-by-line, so reformatting a document or reordering its keys does not show up as a difference.

    How to use it

    1. Paste the original document on the left and the changed one on the right, or drop a .json file onto either.
    2. Press Compare — or just keep typing, since it compares as you go once both sides are valid.
    3. Use the Added, Removed and Changed filters to narrow the list.
    4. Copy the differences, or download them as a text file.

    Supported input

    • .json files, dropped onto either side
    • Pasted JSON of any shape — object, array or a bare value
    • Documents up to 20 MB per side

    Privacy

    Runs entirely in your browser. Nothing you put in it ever leaves your device. Everything happens in JavaScript on this page, so the tool keeps working even if you go offline after it has loaded — which is the simplest way to see for yourself that nothing is being sent. Read the full privacy information.

    Questions

    Why does reordering keys not show as a difference?

    Because JSON objects are unordered by definition: {"a":1,"b":2} and {"b":2,"a":1} are the same document. A tool that reported a difference there would be telling you about the program that wrote the file rather than about the data.

    What about arrays?

    Arrays are ordered, so [1,2] and [2,1] genuinely differ and are reported as such. If a particular array is really a set, turn on “Ignore the order of array items” and matching items are paired off regardless of position.

    What do the paths mean?

    They are written the way you would reach the value in code: $.customer.name for a property, $.items[2].sku for an array element, and ["odd key"] where a key contains characters that would make a dotted path ambiguous.

    Will it cope with large files?

    Up to 20 MB per side. Beyond a few hundred kilobytes the comparison moves to a background thread so the page stays responsive while it works. If two documents differ in thousands of places the list is capped, because at that point a list is no longer the useful answer.

    Are my documents uploaded?

    No. Both are parsed and compared in your browser, including the background thread, which is part of the same page. Nothing is sent to our server — disconnect after the page loads and the tool keeps working.