Close Menu
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn WhatsApp Telegram
Monday, September 14
  • About
  • Contact
  • Advertise
  • Disclaimer
  • Privacy Policy
  • Editorial Policy
  • Tools
  • Games
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
JustwebworldJustwebworld
Home » Tools » Web & Developer » JSON Merge

JSON Merge

Michael Austin Updated:August 24, 2026

Merge two JSON documents — deep recursive merge with array strategies (replace, concat, unique), shallow merge, or RFC 7386 JSON Merge Patch where null deletes a key.

Three merge semantics, chosen explicitly

“Merge these two JSONs” hides three different operations, and picking the wrong one corrupts data quietly. Deep merge recurses into nested objects so the override document only mentions what changes — the config-layering classic. Shallow merge replaces whole top-level values. JSON Merge Patch (RFC 7386) is what many HTTP PATCH APIs — including Kubernetes — actually speak, with its special rule that null deletes a key. This tool makes you pick, and arrays get their own explicit strategy.

Worked example

Deep merge of base + overrides:

A: { "app": { "name": "Demo", "debug": false, "ports": [80] } }
B: { "app": { "debug": true, "ports": [443] } }

Result (arrays: replace):

{ "app": { "name": "Demo", "debug": true, "ports": [443] } }

When to use it

  • Layering configuration: defaults + environment + local overrides.
  • Building the merged state an RFC 7386 PATCH request would produce, before sending it.
  • Combining partial records from two sources into one document.

Limitations to know

  • Normal merges cannot remove keys — only Merge Patch mode (null deletes) or the Property Remover can.
  • Array merging has no universal right answer; that is why replace/concat/unique is your explicit call.

Common errors and fixes

  • A key vanished in Merge Patch mode — it was null in B; that is the RFC semantics, and the warning says so on every merge-patch run.
  • Verify the result — diff it against A with JSON Compare to see exactly what the merge changed.

How to use the JSON Merge

  1. Paste the base document into JSON A and the overrides into JSON B.
  2. Pick the merge mode — deep, shallow, or RFC 7386 Merge Patch.
  3. For deep mode, choose the array strategy: replace, concat, or unique.
  4. Click "Merge JSON" and copy the result.

Frequently asked questions

What is the difference between deep and shallow merge?

Shallow only looks at top-level keys — a nested object in B replaces A's entire nested object. Deep recurses, combining nested objects key by key, so B only needs to mention what changes. Config layering (defaults + environment) is the classic deep-merge case.

How are arrays merged?

Your choice of three strategies: replace (B's array wins — the safest default), concat (A then B), or unique (concat minus exact duplicates). There is no universally correct answer, which is why it is an explicit option.

What is JSON Merge Patch?

RFC 7386 — the merge format used by many HTTP PATCH APIs (including Kubernetes). Its special rule: setting a key to null DELETES it from the target. This tool implements exactly those semantics in that mode.

How do I remove a key with a normal merge?

You cannot — merging only adds and overwrites. Use Merge Patch mode with null, or the Property Remover afterwards.

Related JSON tools

More in Web & Developer.

  • JSON Compare — Compare two JSON documents value by value: every added, removed and changed value reported with its JSONPath and before/after.
  • JSON Patch Applier — Apply an RFC 6902 JSON Patch to a document — all six operations (add, remove, replace, move, copy, test), executed in order with test-failure abort, exactly per the spec.
  • JSON Patch Generator — Generate an RFC 6902 JSON Patch — the add/remove/replace operations that transform document A into document B — ready for HTTP PATCH requests and audit logs.

cards
Powered by paypal
Follow on WhatsApp Follow on Telegram
Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram WhatsApp Copy Link
Previous ArticleJSON Query Filter
Next Article JSON Patch Generator
Michael Austin
  • Website
  • Facebook
  • X (Twitter)
  • Pinterest
  • Instagram
  • LinkedIn

Michael Austin is the current owner of Justwebworld and manages the platform’s editorial direction, content strategy, and digital publishing operations. With a strong interest in online media and modern publishing, he focuses on creating informative, engaging, and easy-to-understand content across multiple categories.Under his leadership, Justwebworld continues to grow as a trusted multi-niche digital publication covering technology, business, lifestyle, automotive, sports, travel, and trending internet topics for readers worldwide.

Related Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 41.9K other subscribers
Categories
Latest Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Filing a Personal Injury Claim in Durham

Looking for Easy Banking After Retirement? Consider a Digital Savings Account

Can I Get ₹1.5 Crore Term Insurance on a ₹10 Lakh Salary?

How to Switch Your Car Insurance Company Without Losing Your Benefits?

The content on this website is provided solely for educational and informational purposes. We do not promote, endorse, or deal in any products, services, or activities mentioned. While we strive to share accurate and up-to-date information, we make no warranties regarding completeness, reliability, or accuracy. Any action you take based on the information found here is strictly at your own risk, and we will not be liable for any losses or damages in connection with the use of our website.

DMCA.com Protection Status
Justwebworld

Explore knowledge, feed curiosity — trusted by readers since 2012.

Explore Topics
TechBusinessDigitalMoneyLearnPeopleLifestyleCultureHealthHomeTravelGamingFashionAutoFoodMindLawSportsShoppingAI
Popular Tools
Age CalculatorWord CounterCase ConverterLove CalculatorReading TimePeriod CalculatorNumber to WordsAngel NumberHarry Potter NameDemon NameKingdom NameAll Tools →
Popular Games
Bubble BlastSudokuTruth or Dare WheelYes / No WheelAll Games →
Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn WhatsApp Telegram Threads RSS
  • About
  • Contact
  • Advertise With Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Editorial Policy
  • Write for Us
Copyright © 2012-2026. Justwebworld - All Rights Reserved. | Sitemap

Type above and press Enter to search. Press Esc to cancel.