Skip to content

JSON Formatter FREE

Format, validate, inspect and compare JSON in your browser. Precise syntax errors, a tree view, key sorting, search and a semantic diff that ignores formatting.

Free to use No registration Privacy-first

JSON workspace

Your JSON is processed locally in your browser and is never uploaded to our servers.

More

Convert to

Load an example

Paste, type or drop a file
The version to compare against

Tab indents the current line or selection. Press Escape first if you want Tab to move to the next control instead.

Paste JSON to begin

Validation runs as you type. Once the document parses you get statistics, a tree view with copyable paths, and the format, minify and sort actions. Nothing is sent anywhere.

Document statistics

Statistics appear once the document parses.

Tree view

The tree appears once the document parses.

Differences

Reference

Working with JSON

01

Formatting and minifying

Formatting re-indents a document without touching what it holds: the parser reads it, and the serializer writes the same values back with two spaces, four spaces or tabs. Minifying is the same operation with the whitespace removed, which is what you want before putting a payload in a header, a query string or a fixture. Values, escapes and Unicode come back exactly as they went in.

02

What validation tells you

A validator that only says "invalid" has told you nothing. This one reports the line, the column and the character offset, names the cause - a trailing comma, a single-quoted key, a missing colon, a comment - and prints the surrounding lines with a caret under the fault. It also reports two things a parser hides: duplicate keys, which JSON.parse silently collapses to the last one, and large integers that lose precision the moment JavaScript reads them.

03

How the comparison works

The diff compares data, not text. Two documents that differ only in indentation, in line endings or in the order their keys were written are reported as the same document. Arrays are compared as sequences, because their order is part of the data: one inserted element is reported as one insertion rather than as everything after it changing. Each difference is shown as added, removed, changed or type changed, with a symbol and a word as well as a colour.

04

Tree view and paths

The tree view opens a document one level at a time, so a large file does not become a large page. Every row carries the path that reaches it - users[4].email, profile.address.city - and a copy button for the path and for the value, which is usually what you actually needed from the file.

05

Everything runs in your browser

The document you paste, the file you drop, the parsed values, the statistics and the diff never leave this tab. There is no API call behind this tool, nothing is written to storage except your indentation preference, and nothing goes into the address bar. That matters here more than on most tools: production API responses and configuration files usually carry credentials, customer records or internal hostnames.

06

Where this gets used

Reading an API response that arrived on one line. Checking a webhook payload against what your handler expects. Finding what changed between two versions of a configuration file. Turning a sample response into a TypeScript interface. Confirming that a log line is valid JSON before you blame the parser.

Scope and limits

What this workspace covers

In-browser parsing, with the limits stated

Formatting and minifying go through the browser's own JSON parser and serializer, so values, escapes and Unicode are preserved exactly. Validation is done by this tool's own scanner, which is why it can report a line and a column that the browser's message does not give, and why it can warn about duplicate keys and about integers that lose precision. Documents are capped at 5 MiB, syntax highlighting switches off above 300 KiB so a large file stays typeable, and the detailed diff stops early on very large trees. It does not validate against a JSON Schema and it does not repair broken documents.

Help

FAQ

Is my JSON uploaded anywhere?

No. Formatting, validation, the diff, the statistics and the tree all run in your browser. This tool has no API call, and nothing you paste or drop is written to storage or put in the address bar. The only thing kept between visits is which indentation you picked.

Why does the diff say two documents are the same when the files differ?

Because it compares data rather than text. Indentation, line endings and the order object keys were written in carry no meaning in JSON, so they are not reported as differences. Array order does carry meaning and is compared as a sequence, so a reordered list is a real difference.

What happens to duplicate keys?

The scanner finds them and warns you, but nothing can recover them: JSON.parse keeps only the last value for a repeated key, and every other JSON parser you are likely to use does the same. The warning tells you which key and which line, so you can fix the producer.

How large a file can I open?

Up to 5 MiB. Above roughly 300 KiB the syntax colours switch off so that typing stays smooth, and on very large documents the detailed diff stops early and says so. Statistics and validation keep working across the whole range.

Build a better web, faster.

We build custom software and solutions tailored to your needs.

Get in touch