JSON Formatter
Format, minify and validate JSON right in your browser. Nothing is uploaded — it works offline.
This free JSON formatter lets you format JSON online, minify it and validate it against the JSON specification — no upload, no signup. Paste messy JSON on the left and get clean, indented JSON on the right, with the exact line and column of any syntax error.
How to format JSON online
Paste a JSON object or array into the input box, then choose Format to produce readable, indented JSON. Use Minify for a compact version or Validate to find syntax errors.
The formatter runs locally in your browser, so configuration files, API responses, and logs are not uploaded. Sort keys when you need stable, repeatable output for reviews or comparisons.
Full guide: How to format JSON (and fix the errors that break it)
Reference: RFC 8259 (JSON). Parsing runs on your browser's built-in JSON engine.
Example
Input: {"b":2,"a":[1,2]}. Format gives two-space indentation; with Sort keys ticked, "a" comes first:
{
"a": [
1,
2
],
"b": 2
}
Invalid input such as {"a": 1,} (a trailing comma) reports line 1, col 9 in Chrome: the position of the } the parser didn't expect. More in the JSON guide.
How to use the JSON Formatter & Validator
- Paste your JSON into the input box on the left.
- Choose Format, Minify or Validate — or press Ctrl+Enter.
- Copy the result to the clipboard, or load the example to explore.
Frequently asked questions
How do I format JSON online?
Paste your JSON into the box and click Format. The formatter indents and structures the output instantly — the page works offline, so nothing leaves your browser.
Is my JSON data uploaded to a server?
No. Everything runs locally in your browser. Your JSON never touches a server, which makes it safe for configs, logs and API responses.
How can I check if my JSON is valid?
Click Validate. The tool reports the exact line and column of the first syntax error, so you can fix broken JSON fast.
Does it work with large JSON files?
Yes, but files of tens of megabytes are limited by your browser's memory. Typical API payloads and config files are instant.
Fun facts about JSON Formatter
- Douglas Crockford popularised JSON in the early 2000s; it was first published as RFC 4627 in 2006, and today's standards are RFC 8259 and ECMA-404.
- The name 'JSON' stands for JavaScript Object Notation, but it's language-independent and used by virtually every modern programming language.
- Since ECMAScript 2019, every valid JSON text is also valid JavaScript; before that, two Unicode line-separator characters made JSON not quite a subset.
- JSON has just seven kinds of value: objects, arrays, strings, numbers, true, false and null.
- JSON's media type, application/json, was registered with IANA in 2006 through RFC 4627.