Contact

Tools  /  JSON  /  Object Merger

Object Merger

Deep-merge two or more JSON objects in order -- configurable array strategy (replace/concat/union/merge-by-index), conflict handling, RFC 7396-style null-deletes-key semantics, and a per-key merge report.

What this tool does

Add two or more JSON objects and they merge into one, in order — each later object's values win over an earlier one's wherever they overlap, recursing into nested objects rather than replacing them wholesale. Add as many objects as needed; the merge is not limited to a pair.

Deciding what happens on conflict

When two objects disagree on the same key, three modes control the outcome: the later object wins, the earlier object wins, or the conflict is flagged in the report while the later value is still used — showing both the value that was kept and the one it replaced, instead of silently picking one and leaving the other value with no trace.

Deciding what happens to arrays

Arrays do not merge the same way objects do, so four strategies are available: replace (the later array wins outright), concat (both arrays end up back to back), union (concatenated, then deduplicated), and merge-by-index (the object at position 0 in one array deep-merges with the object at position 0 in the other, and so on) — the last one specifically for arrays that hold objects representing the same kind of thing in order.

Deleting a key during a merge

Turning on null-deletes-key changes what a null value means: instead of merging in as the value null, it removes that key from the result entirely. This is the semantic used by RFC 7396 (JSON Merge Patch), the standard way a patch document expresses "remove this field."

Seeing exactly what happened

Every key touched by the merge appears in a report — added, overwritten, unchanged because both sides already agreed, deleted by a null, or handled by whichever array strategy was chosen — rather than handing back only the final result and leaving what actually happened to each field a matter of inference.

Privacy

Parsing and merging both happen in your browser. Nothing you paste, drop, or load from a file is sent to a server.

Frequently asked questions

Is my data uploaded anywhere?
No. Parsing and merging both run locally in the browser — nothing is sent to a server.
Can it merge more than two objects at once?
Yes — objects can be added one after another and all of them merge in order, each later one winning over the earlier result wherever they overlap. The merge is not limited to a pair.
What are the different ways it can combine arrays?
Replace lets the later array win outright. Concat places both arrays back to back. Union concatenates then removes duplicates. Merge-by-index deep-merges the objects at matching positions, for arrays where each position represents the same kind of record across both sides.
What happens when both objects have a different value for the same key?
Depending on the conflict mode chosen, either the later object wins, the earlier object wins, or the conflict is flagged in the report with both values shown, while the later value is still used in the result.
What does using null to delete a key mean?
With that option turned on, a key set to null in a later object removes that key from the result entirely instead of merging in as the value null. This matches RFC 7396 (JSON Merge Patch), the standard way a patch document expresses that a field should be removed.
Does it show what actually happened during the merge, not just the final result?
Yes — a per-key report lists whether each touched field was added, overwritten, left unchanged, deleted by a null, or handled by the chosen array strategy, so the outcome can be checked rather than only trusted.
Theme Accent