JSON formatter
Validate, pretty-print or minify JSON, in your browser. Nothing is uploaded, so secrets stay secret.
How to json formatter
- Paste your JSON into the box.
- Pick Format (indented, readable) or Minify (one compact line).
- Press Convert. Invalid input is reported with the actual parser error.
- Download the result as a .json file.
What this tool does
It runs your text through the browser's own JSON parser and writes it back the way you want it: two- or four-space indentation for reading and diffing, or a single minified line for configs and payloads. If the input is valid, the output is exactly equivalent data, reformatted; if it is not, you get the parser's real error message instead of a vague shrug.
Minifying pays for itself with config files and API fixtures: the same data, a fraction of the bytes. Formatting pays for itself whenever a human has to read the file: git diffs become line-by-line, reviews become possible, and one misplaced brace is findable at a glance.
Because the parser is the browser's own, the validation is the same check your application will apply: if this tool accepts it, JSON.parse will too.
Limits and honest notes
The formatter validates and reformats; it does not fix broken JSON. A missing comma stays a missing comma, reported honestly with the parser's position.
Duplicate keys keep their last value (that is the JSON.parse rule), and very large inputs are bounded by the tab's memory, not a server quota.
Everything happens in this tab: paste secrets, API responses and config files with confidence, because nothing is transmitted.
Frequently asked questions
It says my JSON is invalid. Where exactly?
The error message is the browser parser's own, and it names the position. Common culprits: trailing commas, single quotes, and unquoted keys.
Format or minify?
Format for anything a human reads or a git repo stores. Minify for anything a machine consumes.
Does it sort keys or change my data?
No. Values, order and duplicates behave exactly as JSON.parse defines; only whitespace changes.
Is my JSON uploaded?
No. Formatting runs entirely in your browser, which is why pasting secrets is safe.
Private by design
Stays on your device. Nothing is uploaded. The conversion runs in your browser: open the Network tab while you convert and you will see that nothing is sent. No account, no watermark, no daily limit.