JSON Merge
Combine multiple JSON objects with smart conflict resolution. Deep merge nested objects, handle arrays, and customize merge behavior for your workflow.
Merge Options
JSON Sources (2)
Drag to reorder • Top to bottom priorityNo merge result yet
Add valid JSON to your sources to see the merged result
How Merging Works & Tips
Merge Rules
- • Objects: Properties from later sources override earlier ones
- • Deep merge: Nested objects are recursively merged
- • Arrays: Choose replace, concat, unique, or merge by key
- • Order: Sources are merged top to bottom (drag to reorder)
Keyboard Shortcuts
- Ctrl+Enter — Merge sources
- Ctrl+S — Download result
RFC 7396 Merge Patch
The merge patch shows changes from Source 1 to the result. Use null values to delete keys.
How to Use
- 1Paste, upload, or drag & drop your first JSON object. Name your sources for clarity.
- 2Add more sources as needed. Use "Batch Upload" for multiple files at once.
- 3Drag sources to reorder them — merge priority goes from top to bottom.
- 4Configure merge options: array handling, null values, output format, and key sorting.
- 5View the result in Code, Tree, or Diff view. Download or generate an RFC 7396 Merge Patch.
Array Merge Strategies
- Replace: Later sources completely override earlier arrays
- Concatenate: Arrays are combined end-to-end
- Unique: Array values are merged, removing duplicates
- Merge by Key: Objects in arrays are matched and merged by a key field (e.g., id)
Keyboard Shortcuts
- Ctrl + Enter — Merge sources
- Ctrl + S — Download result
Frequently Asked Questions
What is JSON merging?
JSON merging combines two or more JSON objects into a single unified object. When objects have overlapping keys, a merge strategy determines which value wins. Deep merging recursively combines nested objects rather than replacing them entirely.
How does deep merge differ from shallow merge?
Shallow merge only combines top-level properties — if both objects have the same key, the second value completely replaces the first. Deep merge recursively combines nested objects, preserving properties that exist in one object but not the other.
What happens when both JSON objects have the same key?
By default, the value from the later source wins (last-write-wins). For arrays, you can choose to replace, concatenate, merge unique values, or merge by a key field (like "id"). For nested objects with deep merge enabled, the objects are recursively combined.
Can I merge more than two JSON files?
Yes! You can add as many JSON sources as needed using the "Add Another JSON Source" button or batch upload multiple files at once. Sources are merged in order from top to bottom, and you can drag to reorder them.
Is my data safe when using this tool?
Absolutely. All merging happens entirely in your browser using JavaScript. Your JSON data is never sent to any server, stored, or logged. This tool is completely privacy-first.
What is a JSON Merge Patch (RFC 7396)?
RFC 7396 defines a standard format for describing changes to a JSON document. This tool can generate a merge patch that shows what changed from your first source to the merged result. Use it with HTTP PATCH requests or to track changes programmatically.
How does "Merge by Key" work for arrays?
When you select "Merge by key field", arrays of objects are intelligently merged based on a matching key (like "id"). Objects with the same key value are deep-merged together, while new objects are added. This is perfect for merging user lists, product catalogs, or any array where items have unique identifiers.
What are common use cases for JSON merging?
Common use cases include: combining configuration files (like package.json), merging API responses, consolidating data exports, creating unified settings from defaults and overrides, merging i18n/translation files, and aggregating multiple JSON data sources.
Related Tools
JSON Minifier
Compress and minify JSON data instantly. Reduce file size while maintaining valid JSON structure.
JSON Validator
Validate JSON syntax in real-time. Get clear error messages with line and column numbers.
JSON Schema Validator
Validate JSON against JSON Schema drafts with grouped violations, draft detection, and path-aware diagnostics.
JSON Sorter
Sort JSON keys alphabetically or by custom priority with real-time preview.
JSON Split
Break large JSON files into smaller chunks. Split by item count, file size, or key path.
JSON Compare
Compare two JSON files side-by-side with semantic diff. See additions, deletions, and modifications.
JSON Patch Generator
Generate RFC 6902 JSON Patch operations from original and modified JSON with pointer-safe paths.
JSON Grid Viewer
Explore JSON as a sortable grid with nested cell inspection, dataset-path selection, and visible-state CSV or Excel export.
JSON Flattener
Flatten nested JSON into export-ready key-value output or record-path rows with field profiling, path filtering, and table-friendly previews.
JSON Unflatten Tool
Rebuild nested JSON from flat dotted, bracketed, slash, and pointer-style keys with conflict diagnostics and verification.
JSON Key Extractor
Extract nested JSON keys and path structures with notation controls, dedupe modes, and export-ready output.
JSON to CSV
Convert JSON to CSV with deep flattening, array explosion, and clean spreadsheet-ready output.
CSV to JSON
Convert CSV to JSON with auto-detection, type inference, and flexible output structures.
CSV to XML Converter
Convert CSV into structured XML with root and row controls, field-level path mapping, and preview-first local processing.
JSON to XML
Convert JSON to well-formed XML with advanced mapping controls, audit summary, and privacy-first local processing.
XML to JSON
Convert XML to predictable JSON with profile presets, namespace control, and audit transparency.
XML to YAML Converter
Convert XML to readable YAML with roundtrip-aware metadata controls, structure preview, and safety audit reporting.
XML to CSV Converter
Convert XML into spreadsheet-ready CSV with record-path selection, nested flattening controls, and table preview.
XML to HTML Table Converter
Convert XML into responsive HTML table markup with record-path selection, column controls, and preview-first local processing.
Compare XML Online
Compare two XML files with an XML-aware diff engine, tree-first results, semantic matching, and side-by-side raw verification.
XML Viewer
Inspect XML in a tree-first viewer with XPath find, selected-node details, syntax-aware raw XML, and local-only processing.
XML Validator
Validate XML well-formedness with exact line and column errors, fix guidance, lightweight structure preview, and local-only processing.
XML Minifier
Minify XML safely with validation-first processing, optional comment removal, reduction metrics, and local-only output.
XML Formatter And Beautifier
Pretty print, beautify, minify, and validate XML with whitespace-safe defaults, structure preview, and local-only processing.
XML Sorter
Sort repeated XML collections safely by tag, attribute, or child text with scoped path selection and reorder preview.
XML to XSD Converter
Generate XSD 1.0 schemas from one or more XML samples with smart type inference, occurrence detection, and namespace controls.
XSD to XML Converter
Generate sample XML from XSD with root selection, related-file resolution, choice handling, and namespace-aware output.
JSON to YAML
Convert JSON to valid YAML with profile presets, large-file safety, and conversion audit reporting.
YAML to JSON
Convert YAML to predictable JSON with duplicate-key safeguards, policy controls, and conversion audit.
YAML to XML Converter
Convert YAML to valid XML with root controls, multi-document handling, and audit-first local processing.
HTML to XML Converter
Convert HTML tables into valid XML records with header mapping, root and row controls, and preview-first local processing.
Mock JSON Generator
Generate realistic mock JSON with a visual builder, seeded faker data, schema mode, reusable templates, and local-only processing.
JSON to Base64 Converter
Encode valid JSON into Base64 or Base64URL with UTF-8-safe processing, serialization controls, and a compact size audit.
JSON to SQL Converter
Generate editable CREATE TABLE schemas and INSERT statements for PostgreSQL, MySQL, and SQLite with nested-data handling.
SQL to JSON Converter
Convert SQL query results, tabular data, and simple INSERT SQL into typed JSON with manual nesting and local-only processing.
Base64 to JSON Converter
Decode Base64 and Base64URL strings into readable JSON or raw text with JWT, data URI, and large-payload support.
JSON Mock API Generator
Turn JSON into hosted mock REST APIs with CRUD route inference, runtime persistence, a built-in tester, and shareable URLs.
JSON to String Converter
Escape valid JSON into string literals and decode escaped JSON wrappers for JavaScript, Python, Java, APIs, and env vars.
JSON to Text
Convert JSON into readable text formats with flattening, paragraph, and template modes.
JSON to Markdown
Convert JSON into documentation-ready Markdown with smart mode detection, template loops, and audit visibility.
Markdown to JSON
Convert Markdown into structured JSON blocks and sections with AST parsing, strictness controls, and audit visibility.
Text to JSON
Convert text, logs, JSON Lines, and delimited tables to structured JSON with audit visibility.
PDF to JSON
Extract structured data from PDFs with OCR, layout analysis, and table reconstruction.
JSON Path Finder
Discover exact and wildcard JSONPath expressions with interactive tree exploration, search, and live extracted values.
JSON Pretty Print & Viewer
Pretty-print, minify, and inspect JSON with strict-valid output, lenient repair modes, tree search, and local-only processing.
JSON to Java Converter
Generate Java POJO classes from JSON with Jackson, Gson, or Lombok annotations, getters/setters, and constructors.
Java to JSON Converter
Convert Java POJO class definitions to sample JSON with annotation-aware key mapping.
JSON to PHP Converter
Convert JSON to PHP associative arrays or stdClass objects with configurable syntax and variable naming.
PHP to JSON Converter
Convert PHP arrays and objects to valid JSON with automatic type detection and syntax stripping.
JSON to Protobuf Converter
Generate Protocol Buffer .proto schema definitions from JSON with auto field numbering and proto2/proto3 syntax.
Protobuf to JSON Converter
Generate sample JSON from Protocol Buffer .proto schema definitions with nested message and enum support.
JSON to C# Converter
Generate C# model classes from JSON with Newtonsoft.Json or System.Text.Json attributes and nullable type support.
C# to JSON Converter
Convert C# class definitions to sample JSON with attribute-aware key mapping and nullable type support.
JSON to TSV Converter
Convert JSON arrays and objects into tab-separated values with nested flattening, array handling, and table preview.
TSV to JSON Converter
Convert tab-separated values into structured JSON with type inference, nested key expansion, and multiple output formats.
Query Parameters to JSON
Parse URL query strings into structured JSON with nested object support, bracket arrays, and type inference.
JSON to Query Parameters
Convert JSON objects into URL query strings with configurable array formats, nested key notation, and URL encoding.
Base64 Decode Tool
Decode Base64 and Base64URL strings into text, JSON, or hex with JWT detection and format auto-detection.
JSON Escape / Unescape
Escape and unescape JSON strings with JSON, JavaScript, and HTML entity modes and auto-detection.
JSON to TypeScript
Generate TypeScript interfaces and types from JSON data. Supports nested objects, arrays, optional nulls, readonly, and JSDoc.