JSON Formatter
Format, validate, and minify JSON right in your browser. Paste JSON below, adjust indentation or sort keys, and get an exact line and column for any syntax error. Nothing you paste is ever uploaded.
π Processed on your device Β· Never sent anywhere Β· Not stored
Parse JSON before changing its presentation
Paste JSON to validate it with the browserβs strict parser, then display it with two spaces, four spaces or tabs, or minify it to one line. A syntax failure is reported with available location details. Because the input is parsed into JavaScript values first, duplicate object keys may collapse and numeric edge cases can be normalized; use a lossless specialist parser when those distinctions matter.
Inspect responses, payloads and configuration files
- Make a minified JSON API response easier to inspect
- Apply consistent indentation to a payload or configuration file
- Sort JSON object keys before a human comparison
- Remove optional whitespace before copying JSON into a constrained field
Frequently asked questions
Does this validate my JSON?
Yes. Format and Minify both invoke strict JSON parsing. Error location details depend on the browser parser and the message it exposes, so line and column information may vary.
What happens to duplicate keys in an object?
When parsed with JSON.parse, later occurrences normally replace earlier keys with the same name. Since the discarded values cannot be recovered afterward, inspect untrusted data before formatting if duplicates matter.
Does sorting keys change my data?
It changes JSON object-key order but preserves array order and the parsed value structure. Parsing may already have collapsed duplicate keys or normalized certain numbers. Do not use sorted output for signatures or byte-level comparisons.
Is there a size limit?
The interface sets no fixed JSON quota. Practical capacity depends on browser memory, input structure and parsing cost; very large or deeply nested data can slow or crash a tab.
π Want the full picture? Read our guide: How to Format and Validate JSON (and the Syntax Rules That Actually Matter)