Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Merge

Combine two documents into one, see exactly which values disagreed and who won, or generate the RFC 7386 patch that turns one into the other.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Left document

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Right document

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Result

    The result appears here.

    Conflicts

    Points where the two sides disagreed appear here.

      Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

      About this tool

      Merging two documents means deciding, key by key, what the result should hold when both sides have something to say about it. Deep merge recurses into a nested object present on both sides and combines it the same way; shallow merge treats a shared key as a single unit and lets one side replace the other wholesale, however deep that value goes. Where the two sides genuinely disagree, a priority setting decides which one is kept, right by default, since applying a second document on top of a first is the more common reading. Arrays are not objects, so they get their own choice: replace lets priority decide which array survives, concatenate appends the right array after the left one, concatenate unique does the same and then drops anything already equal to an earlier entry, and merge by key treats both arrays as tables, matching elements by one field and merging the matches while appending whatever had no match on either side. A conflict is reported only where a value was actually discarded, never for a key only one side had, and never for two numbers that just happen to be written differently, 1 and 1.0 read as the same value everywhere on this site. Generating a merge patch is a different operation with a fixed algorithm, RFC 7386, rather than the options above: it produces the smallest document that, applied to the left side by any conforming implementation, turns it into the right side. A key the left side had and the right side does not becomes null in the patch, which is also, unavoidably, what a key genuinely set to null becomes: the standard itself cannot tell the two apart, and this page cannot either.

      How to use

      1. Paste the left document, the one being merged into, on the left, and the one being applied on top of it on the right. Load the sample to see a conflict, an addition and a combined nested object at once.
      2. Choose deep or shallow merge, which side wins a real conflict, and how arrays at the same path should be combined.
      3. Press Merge. The result is on the right, and every point where a value was actually discarded is listed below it with both sides and which one was kept.