Format, validate and minify JSON, with errors that point to the exact line.
Minified API response
Typical compact JSON from a server
{"id":42,"name":"Ada Lovelace","roles":["admin","editor"],"active":true}Nested configuration
Deeply nested object with arrays
{"server":{"host":"localhost","port":8080,"tls":{"enabled":true,"ciphers":["TLS_AES_128_GCM_SHA256"]}}}Broken JSON
A trailing comma — see the error message
{
"name": "test",
"value": 1,
}Minified API response
Typical compact JSON from a server
{"id":42,"name":"Ada Lovelace","roles":["admin","editor"],"active":true}Nested configuration
Deeply nested object with arrays
{"server":{"host":"localhost","port":8080,"tls":{"enabled":true,"ciphers":["TLS_AES_128_GCM_SHA256"]}}}Broken JSON
A trailing comma — see the error message
{
"name": "test",
"value": 1,
}Drop in a minified response, a config file, or anything you copied from a log. The tool starts working as you type — there is nothing to submit.
Two spaces, four spaces or tabs for readable output, or minify to strip every unnecessary character before sending it over the wire.
Copy to the clipboard for a quick paste, or download it as a .json file. Sorting keys alphabetically first makes two documents far easier to diff.
Instead of "Unexpected token at position 247", you get the line, the column, the offending character and the most likely cause.
Parsing happens in your browser. API keys and customer data inside a payload never touch a server, so pasting production JSON is safe.
Alphabetising keys recursively turns two structurally identical documents into an identical text, which makes real differences obvious.
A JSON formatter that does the two things you actually need: makes unreadable JSON readable, and tells you precisely where it breaks when it will not parse. Paste a minified API response and get properly indented output instantly, or collapse a formatted document back down for transport. When the input is invalid, you get the line and column of the problem along with the most likely cause — a trailing comma, an unquoted key, an unclosed bracket — rather than a cryptic parser message. Everything runs in your browser, so configuration files and API payloads never leave your machine.
Keep going
Related pages in Developer Tools, plus what others are using right now.
More developer tools that pair well with this one.
Indent and validate XML, with clear messages when tags do not match.
Tidy YAML indentation, validate structure and convert between YAML and JSON.
Format JavaScript and TypeScript with the same rules your editor uses.
Encode text to Base64, including full Unicode and URL-safe output.
Format SQL queries across dialects, with consistent keyword casing and indentation.
Indent messy HTML into readable, consistently structured markup.
Create strong random passwords with full control over length and characters.
Work out any percentage — of a number, as a share, or as a change.
Count words, characters, sentences and paragraphs as you type.
Convert between length, weight, temperature, volume, speed, data and more.
Count characters with and without spaces, against the limits that matter.
Find the mean, median, mode and range of a list of numbers, with the working shown.
Sample and population standard deviation and variance, both shown, with the working.
Turn a logo into favicon.ico, the PNG sizes a site needs, and the HTML to declare them.
Check a downloaded file against its published checksum, without uploading anything.
Stamp text like DRAFT or CONFIDENTIAL across a PDF, in your browser.
See how savings grow with compounding, including regular contributions.
Shrink JPEG, PNG and WebP files with a quality slider and a live size comparison.