DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeJSONJSON Merge / Deep Merge

About JSON Merge / Deep Merge

JSON Merge / Deep Merge preview - JSON tool

Deep merge two JSON objects together. Part of the DevTools Surf developer suite. Browse more tools in the JSON collection.

Use Cases

  • DevOps engineers combining environment-specific config overrides
  • Backend developers merging default and user settings objects
  • CI/CD pipelines assembling config from multiple partial files
  • Data engineers consolidating JSON records from different sources

Tips

  • Preview the merge result before applying to production configs
  • Check array handling — deep merge can concatenate or replace arrays
  • Use this to combine partial config overrides with defaults

Fun Facts

  • Deep merge is not part of the JSON specification — RFC 7396 (JSON Merge Patch) was published in October 2014 to standardize shallow merge semantics.
  • JavaScript's Object.assign() only performs shallow merging, which led to lodash's _.merge() becoming one of the most downloaded npm functions, with over 40 million weekly downloads.
  • The difference between deep merge and shallow merge has caused countless production bugs — Kubernetes kubectl apply uses a strategic three-way merge to handle this complexity.

FAQ

What does deep merge mean?
Nested objects are merged recursively — the second object's keys override the first's, but keys that exist only in the first are preserved at every level. Shallow merge would replace entire nested objects wholesale.
How does it handle arrays?
Arrays are replaced, not concatenated. If the second object has a shorter array at a given key, you get the shorter array. Switch to a custom merge strategy if you need concat behavior.
Is this useful for config layering?
Very — it's how dotenv overrides, Kubernetes overlay files, and Next.js environment config work. Merge base + environment overrides to get the effective config.
Does null in the override remove the key?
No — null is a valid value and replaces the original. If you want to remove a key, use JSON Patch with a 'remove' operation.

Related JSON Tools

JSON FormatterJSON ValidatorJSON ViewerJSON StringifyJSON PatchJSON DiffJSONPath TesterJSON Sort Keys
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf919+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback