JSON Merge Tool
Deep-merge two JSON objects with configurable strategies using our free json merge tool. Paste a Base JSON and an Override JSON, choose how conflicts and arrays are handled — overwrite, preserve, concat, union, or error on conflict — and get the merged result instantly with a key-by-key diff summary. All processing runs locally in your browser — no signup required.
Paste two JSON objects below. The Base JSON is the starting object; the Override JSON is merged on top of it. Configure the merge strategy to control how conflicts and arrays are handled. All processing runs locally in your browser — no signup required.
How to handle conflicting keys
Why Use Our JSON Merge Tool?
Instant JSON Deep Merge
Our json merge tool deep-merges two JSON objects instantly in your browser. Nested objects are recursively merged, arrays are handled by your chosen strategy, and the result is ready to copy or download in milliseconds — no waiting, no server calls.
Secure JSON Merge Online
All json merge processing happens locally in your browser using JavaScript. Your JSON data — including API keys, credentials, and configuration secrets — never leaves your device, ensuring 100% privacy every time you use our json merge tool online.
No File Size Limits
Merge large JSON objects without restrictions. Our json merge tool handles any size input — from small config snippets to large API response payloads. There are no artificial size limits, upload restrictions, or premium tiers.
100% Free Forever
Use our json merge tool completely free with no limitations. No signup required, no hidden fees, no premium tiers, no ads — just unlimited, free json merge operations whenever you need them. The best free json merge tool online.
Common Use Cases for JSON Merge Tool
Configuration Override Patterns
Merge a base configuration JSON with environment-specific overrides. Use the Overwrite strategy to let production, staging, or development configs override base values while inheriting all unspecified settings from the base object.
Docker and Kubernetes Config Merging
Combine base Kubernetes manifest JSON with environment-specific patches. Our json merge tool deep-merges nested objects like spec, containers, and env arrays, making it easy to manage multi-environment deployments.
Feature Flag Merging
Merge a default feature flag JSON with user-specific or tenant-specific overrides. Use the Preserve strategy to ensure default flags are never accidentally overwritten, or Overwrite to let tenant configs take full precedence.
API Response Combination
Combine partial API responses from multiple endpoints into a single unified JSON object. Use the Concat or Union array strategy to merge array fields like tags, permissions, or items without losing data from either source.
package.json and tsconfig Merging
Merge base package.json or tsconfig.json files with project-specific extensions. Our json merge tool handles nested objects like compilerOptions and dependencies correctly, making monorepo config management straightforward.
Infrastructure as Code Patching
Apply patches to Terraform, CloudFormation, or Pulumi JSON configurations. Use the Error on Conflict strategy to catch unintended overwrites before they reach your infrastructure, preventing accidental configuration drift.
Understanding JSON Deep Merge
What is JSON Deep Merge?
JSON deep merge is the process of combining two JSON objects recursively — merging nested objects at every level rather than simply replacing the top-level keys. A shallow merge (like Object.assign in JavaScript) only merges the top level, so nested objects in the override completely replace nested objects in the base. A deep merge recurses into nested objects, merging their keys individually. Our json merge tool performs a full deep merge with configurable strategies for handling conflicts and arrays — all running locally in your browser with no server uploads.
How Our JSON Merge Tool Works
- Input Your JSON Objects: Paste the Base JSON (the starting object) and the Override JSON (the object to merge on top) into the two input panels. Upload .json files directly using the Upload buttons. A sample configuration merge is preloaded so you can explore the tool immediately.
- Configure the Merge Strategy: Choose how conflicts and arrays are handled — Overwrite (override wins), Preserve (base wins), Concat arrays (join arrays), Union arrays (join without duplicates), or Error on Conflict (throw on any conflict). The strategy applies recursively to all nested levels.
- Copy or Download the Result: The merged JSON appears in the output panel with a merge summary showing added, overwritten, and preserved keys. Copy to clipboard or download as a .json file. All processing runs locally — your data never leaves your device.
Merge Strategy Reference
- Overwrite: Override values replace base values at every conflict. This is the most common strategy — equivalent to
_.merge()in Lodash. Nested objects are still recursively merged; only scalar conflicts are overwritten. - Preserve: Base values are kept when a conflict exists. Use this when the base object contains authoritative defaults that should not be overridden, and the override only adds new keys.
- Concat arrays: Arrays at the same key are concatenated —
[1,2] + [3,4] = [1,2,3,4]. Useful for merging lists of items, tags, or permissions. - Union arrays: Arrays are concatenated with duplicate values removed. Useful for merging sets of unique identifiers or feature flags.
Deep Merge vs. Shallow Merge
The key difference between deep and shallow merge is how nested objects are handled. With a shallow merge, if both objects have a configkey, the override's config object completely replaces the base's — losing any base config keys not present in the override. With a deep merge, the two config objects are themselves merged recursively, so base config keys are preserved unless explicitly overridden. Our json merge tool always performs a deep merge, recursing into all nested objects at every level.
Related Tools
JSON to YAML
Convert JSON to YAML format instantly - Free online JSON to YAML converter
XML to YAML
Convert XML to YAML format for configuration migration - Free online XML to YAML converter
CSV to YAML
Convert CSV spreadsheet data to YAML format - Free online CSV to YAML converter
TSV to YAML
Convert TSV tab-separated data to YAML format - Free online TSV to YAML converter
Frequently Asked Questions About JSON Merge Tool
A json merge tool combines two JSON objects into one by recursively merging their keys and values. Our json merge tool performs a deep merge — nested objects are merged at every level, not just the top level. It runs entirely in your browser with no server uploads, and supports five configurable merge strategies.
A shallow merge (like Object.assign in JavaScript) only merges the top-level keys — if both objects have a nested "config" key, the override's config completely replaces the base's config. A deep merge recurses into nested objects, merging their keys individually so base config keys are preserved unless explicitly overridden. Our json merge tool always performs a deep merge.
Use Overwrite when you want override values to take precedence at every conflict — this is the most common strategy. Use Preserve when the base object contains authoritative defaults that should not be changed. Use Concat or Union for array fields that should be combined rather than replaced. Use Error on Conflict to catch unintended overwrites before they cause problems.
By default (Overwrite strategy), arrays at the same key are replaced by the override array. Choose Concat to join both arrays, or Union to join them with duplicates removed. The array strategy applies to all arrays in the JSON at every nesting level.
Absolutely. All json merge processing happens locally in your browser using JavaScript. Your JSON data — including API keys, credentials, and configuration secrets — is never sent to any server, stored, or logged. Your data stays completely private on your device every time you use our json merge tool online.
Yes! Our json merge tool is 100% free with no signup, no account, and no usage limits. Merge JSON objects as many times as you need — completely free, forever.
Yes. If both inputs are JSON arrays, the merge tool applies the array strategy directly — Concat joins them, Union joins without duplicates, and Overwrite replaces the base array with the override array. If one input is an object and the other is an array, the tool applies the scalar conflict strategy (Overwrite replaces, Preserve keeps the base).
When a key exists in both objects but with different types (e.g., a string in the base and an object in the override), the merge tool treats it as a scalar conflict and applies the configured strategy — Overwrite replaces the base value, Preserve keeps it, and Error on Conflict throws an error with the conflicting path.
Yes. Both the Base JSON and Override JSON panels have an Upload button that accepts .json files. The file content is loaded into the input panel and you can then click Merge JSON to process it. All file reading happens locally in your browser — no files are uploaded to any server.