Categories

JSON File Merger

Merge multiple JSON files with various merging strategies (deep merge, overwrite, combine arrays, etc.)

Click to upload files or drag and drop files here

Maximum file size: 10MB Maximum files: 5
Supported formats: application/json, text/plain

Key Facts

Category
Data Processing
Input Types
file, select
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The JSON File Merger is a powerful utility designed to combine multiple JSON files into a single, unified document using customizable merging strategies, including deep recursive merging, array concatenation, and conflict resolution.

When to Use

  • Consolidating configuration files from different environments into a single master file.
  • Merging fragmented data exports from multiple API endpoints or database queries.
  • Aggregating localized language files or translation sets into one comprehensive JSON structure.

How It Works

  • Upload your JSON files using the file selector.
  • Select a merge strategy, such as 'Deep Merge' for nested objects or 'Overwrite' for simple replacement.
  • Configure how arrays should be handled, choosing between concatenation, unique merging, or replacement.
  • Set your conflict resolution preference and download the final, formatted JSON output.

Use Cases

Merging environment-specific configuration files (e.g., dev.json, prod.json) into a single deployment config.
Combining multiple JSON-based log files into a single chronological data set.
Aggregating user-generated data exports from different sessions into one master record.

Examples

1. Consolidating App Configurations

Software Developer
Background
A developer has separate JSON files for database settings, API keys, and UI themes.
Problem
Need to combine these into one 'config.json' without losing nested structure.
How to Use
Upload all config files, select 'Deep Merge' strategy, and choose 'Prettified' output.
Outcome
A single, clean JSON file containing all configuration parameters merged into their respective nested objects.

2. Aggregating Translation Files

Localization Manager
Background
Multiple translators submitted JSON files for different sections of a website.
Problem
Need to merge these into one master translation file while ensuring no keys are lost.
How to Use
Upload all translation files, select 'Deep Merge', and 'Concatenate' for any array-based lists.
Outcome
A unified translation file ready for deployment, with all keys and array values correctly aggregated.

Try with Samples

json, text, file

Related Hubs

FAQ

What is the difference between deep and shallow merge?

A deep merge recursively combines nested objects, while a shallow merge only combines top-level properties, with later files overwriting earlier ones.

Can I merge arrays instead of replacing them?

Yes, you can select 'Concatenate' or 'Merge Unique' in the Array Handling settings to combine array contents rather than overwriting them.

What happens if two files have the same key?

You can define the behavior in the Conflict Resolution settings, choosing to overwrite with the last value, keep the first value, or stop the process with an error.

Is there a limit to the number of files I can merge?

You can upload up to 5 files at a time, with a total file size limit of 10MB.

Can I format the output file?

Yes, the Output Format option allows you to choose between standard, compact, or prettified JSON with 4-space indentation.

API Documentation

Request Endpoint

POST /en/api/tools/json-merger

Request Parameters

Parameter Name Type Required Description
jsonFiles file (Upload required) Yes -
mergeStrategy select Yes -
arrayStrategy select Yes -
conflictResolution select Yes -
outputFormat select Yes -

File type parameters need to be uploaded first via POST /upload/json-merger to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-json-merger": {
      "name": "json-merger",
      "description": "Merge multiple JSON files with various merging strategies (deep merge, overwrite, combine arrays, etc.)",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=json-merger",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]