MergeJSON

How it works

How the JSON tools work.

A free toolkit for working with JSON - merge, format, validate, sort, stringify, generate mock data, minify, view, compare, repair, convert, generate types and schemas, escape, and unescape - with one shared promise: every tool runs entirely in your browser, so nothing ever leaves your device.

The toolkit

Pick a tool to see how it works

Parses each file into a value tree, then recursively combines them using your chosen deep or shallow strategy and array rules — the last (or first) input wins on conflicts.

Open Merge JSON

Parses your JSON to confirm it is valid, then re-serializes it with consistent indentation — 2 spaces, 4 spaces, or tabs — so the structure is easy to read.

Open JSON Formatter

Runs your text through a strict JSON parser. On failure it maps the parser's error position back to the exact line and column so you can fix it fast.

Open JSON Validator

Parses then re-serializes with no whitespace, stripping every optional space and line break. It is lossless — the data is byte-for-byte identical, just smaller.

Open JSON Minifier

Parses JSON, sorts object keys A to Z or Z to A, recursively handles nested objects, and preserves arrays unless you choose to sort them too.

Open JSON Sort

Parses your JSON and walks the value tree to build a collapsible, color-coded outline you can expand and collapse branch by branch.

Open JSON Viewer

Parses both inputs into data trees, then compares paths structurally so whitespace and object key order do not create false changes.

Open JSON Diff

Applies safe repair passes for common almost-JSON problems - trailing commas, comments, smart quotes, Python values, code fences, and unbalanced brackets - then validates the result.

Open JSON Repair

Walks nested objects and arrays to produce one-level path keys, with dot, bracket, slash, or underscore delimiters, array indexes, and reverse unflattening.

Open JSON Flatten

Parses flat dot, bracket, slash, or underscore keys, auto-detects the delimiter, and rebuilds nested objects or arrays from numeric path segments.

Open JSON Unflatten

Flattens each record into a row, turning nested objects into dot-notation columns and letting you expand, join, or keep arrays as JSON — then escapes every field to valid CSV.

Open JSON to CSV

Detects the delimiter, parses quoted fields per RFC 4180, and maps rows to your chosen shape — array of objects, 2D array, or column-keyed — inferring numbers and booleans.

Open CSV to JSON

Builds a real .xlsx workbook in the browser with typed cells, splitting an object of arrays into multiple worksheets — no server and no renamed-CSV shortcuts.

Open JSON to Excel

Parses a JSON array, serializes each item as one compact JSON value per line, strips pretty-print whitespace, and downloads newline-delimited .jsonl output.

Open JSON to JSONL

Reads the .xlsx ZIP locally, resolves shared strings and the style table to recover real dates, and converts each worksheet to JSON in the shape you pick.

Open Excel to JSON

Reads newline-delimited JSON one record per line, validates each line independently, reports exact invalid line numbers, and can reverse JSON arrays back to JSONL.

Open JSONL to JSON

Flattens records into rows and columns, builds a sortable browser table, and exports the same view to CSV, HTML, Markdown, or Excel.

Open JSON to Table

Turns JSON arrays into semantic table markup, with plain, styled, Bootstrap, Tailwind, nested sub-table, and flattened-column output options.

Open JSON to HTML Table

Converts JSON arrays into GitHub-flavored Markdown tables, escaping pipes and line breaks while adding alignment markers for text and numeric columns.

Open JSON to Markdown Table

Walks the JSON tree and emits XML elements, using your root name and array naming rules while escaping text and preserving nested structure.

Open JSON to XML

Parses XML locally, converts elements, attributes, text nodes, and repeated children into predictable JSON, with options for compact or verbose output.

Open XML to JSON

Converts JSON values to readable YAML with controlled indentation and quote style, keeping risky strings quoted so config files stay valid.

Open JSON to YAML

Parses YAML documents, strips comments, resolves anchors and aliases, preserves inferred types, and serializes the result as pretty or minified JSON.

Open YAML to JSON

Scans a JSON array of objects, infers SQL column types, then generates dialect-aware CREATE TABLE and batched INSERT statements.

Open JSON to SQL

Reads a JSON template, replaces placeholders like name, email, date, uuid, and price with realistic values, repeats records by count, and supports nested arrays.

Open JSON Generator

Infers TypeScript interfaces or type aliases from JSON samples, naming nested shapes and detecting optional fields across arrays.

Open JSON to TypeScript

Infers a JSON Schema from sample data with draft selection, required-field controls, examples, and type details such as integer vs number.

Open JSON Schema Generator

Validates JSON, optionally minifies it, encodes it as standard or URL-safe Base64, and can decode Base64 or data URIs back to JSON.

Open JSON to Base64

Validates JSON, serializes it as an escaped string literal with double, single, or backtick quotes, and parses stringified JSON back into objects.

Open JSON Stringify

Runs text through the same escaping rules used by JSON strings, handling quotes, backslashes, newlines, tabs, control characters, and optional Unicode escapes.

Open JSON Escape

Decodes JSON escape sequences like \n, \t, and \uXXXX back to readable text, with a second pass for double-escaped strings.

Open JSON Unescape

How JSON merging works in detail

Merge JSON is a fast, free, browser-based tool for combining JSON data. Whether you are stitching together API responses, layering configuration files, consolidating translation catalogs, or assembling test fixtures, it turns the tedious, error-prone job of merging JSON by hand into a few clicks. There is no signup, no upload, and no waiting — and because every byte is processed locally, your data stays entirely yours.

Two ways to merge

The tool offers two complementary workflows. The Merge files mode lets you drag and drop several .json files at once — or click to browse for them. Each file appears in an ordered list where you can reorder, disable, or remove it, because the order of your inputs determines precedence when keys collide. The Merge code mode gives you a set of live editors where you can paste or type JSON directly. This is perfect for quick experiments, snippets copied from a terminal, or comparing two structures without ever creating a file. You can add as many inputs as you need, and each one is validated the moment you stop typing.

Merge strategies that match reality

Most online mergers offer a single, opaque "combine" button. Real JSON merging is rarely that simple, so Merge JSON exposes the decisions that actually matter:

  • Deep vs. shallow merge. A shallow merge replaces top-level keys wholesale, so a nested object in a later input overwrites the earlier one entirely. A deep merge walks recursively into nested objects and arrays, combining them at every level — ideal for layered configuration.
  • Array strategies. Arrays are where naive mergers fall apart. You can concatenate arrays end to end, take their union to keep only unique items, replace so the last array wins, or merge by key — matching array items by an id field and deep-merging the objects that share one.
  • Conflict resolution. When the same scalar key appears in two inputs, you decide whether the first or the last input wins. Combined with input reordering, this gives you precise control over the final shape.
  • De-duplication and sorting. Optionally strip duplicate primitive values from arrays, and sort every object key alphabetically so the output is stable and diff-friendly.

How the converters work

The conversion tools share the same client-side engine. To turn JSON into CSV or Excel, each record is flattened into a row — nested objects become dot-notation columns, and you decide whether arrays expand into extra rows, join into one cell, or stay as JSON. The Excel writer builds a genuine .xlsx workbook (typed number and boolean cells, multiple sheets) without any server. Going the other way, CSV to JSON auto-detects the delimiter and parses quoted fields per RFC 4180, while Excel to JSON reads the workbook's ZIP locally and resolves shared strings and the style table to recover real dates. Every converter offers three output shapes and runs entirely in your browser.

The same idea applies to JSON to XML, XML to JSON, JSON to JSONL, JSONL to JSON, JSON to YAML, YAML to JSON, JSON to Table, JSON to HTML Table, JSON to Markdown Table, and JSON to SQL: parse first, expose the important format-specific choices, then export a clean result locally. That means XML attributes, YAML quotes, SQL dialects, HTML table classes, Markdown alignment markers, table columns, nested objects, and arrays are handled deliberately instead of being guessed silently.

JSON to Base64 validates JSON before encoding, can minify the JSON first for shorter output, supports standard and URL-safe Base64, generates JSON data URIs, wraps raw Base64 lines, and decodes Base64 or data URIs back into validated JSON on the same page.

JSON to JSONL does the reverse of the JSONL converter for streaming pipelines. It takes a JSON array, removes pretty-print formatting from each item, writes one compact JSON record per line, and downloads a .jsonl file with an optional final newline.

JSONL to JSON is built for streaming-style data. It treats every non-empty line as its own JSON value, reports the exact line that fails validation, and wraps valid records into a JSON array. The same interface can reverse a JSON array back into one compact JSON value per line for NDJSON pipelines.

JSON to HTML Table is tuned for web publishing instead of spreadsheet export. It escapes cell values, turns arrays of objects into semantic <table> markup, and lets you choose plain HTML, a styled snippet, Bootstrap classes, Tailwind classes, nested sub-tables, or flattened columns before copying the final HTML.

JSON to Markdown Table is tuned for documentation workflows. It turns object keys into Markdown headers, escapes pipe characters as \|, converts line breaks to <br>, and generates GitHub-flavored alignment rows so README files, pull requests, and docs render correctly.

How compare and repair tools work

JSON Diff compares parsed values rather than raw text, so indentation, minification, and object key order do not create false positives. It reports changes by path: added values, removed values, and modified values. JSON Repair works in the opposite direction: it takes text that is close to JSON, applies controlled fixes for common problems like trailing commas, comments, Python True/None, smart quotes, code fences, and missing braces, then validates the repaired output. JSON Sort normalizes object key order before review or comparison. It can sort JSON keys A to Z or Z to A, apply the order recursively to nested objects, preserve arrays by default, or sort arrays when deterministic array order matters.

JSON Flatten turns nested structures into flat path-based keys for spreadsheets, logs, search indexes, and comparisons. You choose dot, bracket, slash, or underscore delimiters, decide whether arrays should become indexed paths, and can reverse flat keys back into nested JSON with unflatten mode. JSON Unflatten is the dedicated reverse workflow: it rebuilds nested JSON from flat dot notation, bracket notation, slash paths, or underscore keys, with delimiter auto-detection and optional array coercion for numeric path segments.

How code and schema generators work

JSON Generator creates mock JSON data from a template instead of a fixed form. It parses your template, replaces placeholders such as name, email, date, uuid, integer, price, and choice with realistic values, repeats the template for your selected record count, and supports nested child arrays with repeat markers. JSON to TypeScript and JSON Schema Generator both infer structure from sample JSON. The TypeScript generator turns objects and arrays into interfaces or type aliases, detects optional fields across arrays, and names nested shapes. The schema generator produces a JSON Schema with a draft selector, required-key settings, examples, and type details such as integer versus number. In both cases, the sample stays in your browser and the generated code is ready to review and copy.

How JSON escape and unescape work

JSON Stringify takes complete JSON values, validates them, and turns them into escaped string literals for code, config, logs, or database text fields. It can output double-quoted, single-quoted, or backtick-wrapped strings, and its unstringify mode parses escaped JSON strings back into real JSON. JSON Escape applies the exact rules needed to place raw text inside a JSON string: quotes, backslashes, newlines, tabs, and control characters are encoded safely, with optional Unicode escapes. JSON Unescape reverses that process, decoding sequences like \n, \t, and \uXXXX back to readable text, including double-escaped strings from logs or nested payloads.

Validation before you act

A conversion or merge is only as good as its inputs. Every tool validates as you work, flagging invalid JSON with the exact line and column of the syntax error. If something is wrong, you will know which input — and where — before you ever press the button. That feedback loop turns "why is my output empty?" into a five-second fix.

Privacy by design

Many "online" tools quietly send your files to a server to do the work. Our tools do the opposite: the entire engine is JavaScript that runs in your browser tab. Your data is never transmitted, logged, stored, or seen by anyone — not even us. This matters when your files contain API keys, customer records, internal configuration, or anything else you would not paste into a random website. You can confirm it yourself: open your browser's network panel and watch — the tools produce zero network requests. They even work offline once the page has loaded.

Who it is for

These tools are built for the people who touch JSON every day. Backend and frontend developers merge configuration layers and feature flags. API teams aggregate paginated or multi-source responses. Analysts convert JSON exports to CSV and Excel for reporting, and back again for pipelines. Localization engineers consolidate en.json, fr.json, and dozens more into master catalogs. QA engineers assemble fixtures for test suites. And anyone who has ever tried to hand-edit data in a text editor — and introduced a trailing-comma bug at 2 a.m. — will appreciate having a tool that gets it right every time.

Why it is better than the alternatives

Compared to the other JSON tools online, this toolkit combines three things that usually come separately: genuine control over how data is combined and converted, both file and code workflows in one place, and a hard privacy guarantee. It validates inputs instead of failing silently, explains its strategies instead of hiding them, and exports in the formats you actually need. It is free, requires no account, imposes no file-size ceiling beyond your device's memory, and is fast enough that everything feels instant.

Ready to try it? Open the merge tool, browse all tools, or head to the blog to learn more about how working with JSON works under the hood.