How to use this tool
- Paste JSON, upload a local file, or load a CORS-enabled public URL.
- Optionally choose indentation in Advanced, then run Format JSON.
- Review the result, then copy it or download it with the correct file type.
Format JSON for free, no signup required. Pasted text and local files are processed in your browser.
Format, beautify and validate JSON online with 2, 3 or 4-space indentation. Preserve large numbers and keep your data in your browser.
Format JSON for free, no signup required. Pasted text and local files are processed in your browser.
{"project":"jsonformatters.org","status":"ready","features":["format","validate","convert"],"settings":{"indent":2,"sortKeys":false,"localOnly":true},"documents":[{"id":101,"name":"launch-config.json","valid":true},{"id":102,"name":"sample-data.json","valid":true}],"lastError":null}{
"project": "jsonformatters.org",
"status": "ready",
"features": [
"format",
"validate",
"convert"
],
"settings": {
"indent": 2,
"sortKeys": false,
"localOnly": true
},
"documents": [
{
"id": 101,
"name": "launch-config.json",
"valid": true
},
{
"id": 102,
"name": "sample-data.json",
"valid": true
}
],
"lastError": null
}Formatting changes whitespace, not data; it does not sort keys or repair invalid JSON.
Input must be one JSON value. Comments, trailing commas, unquoted keys, single-quoted strings, NaN, Infinity, and undefined are invalid. Find errors with the JSON validator, or try documented fixes with the JSON repair tool. Repairs change the source.
Numbers and strings—including large integers, exponents and escapes— keep their tokens. Member and array order, plus duplicate members, also remain; only whitespace outside strings changes. Duplicate names are non-portable under RFC 8259, so retain the source when exact bytes or ambiguity matter.
The JSON minifier gives compact, token-preserving output. The JSON viewer builds a tree but rejects duplicate names and inexact JavaScript numbers.
Primary sources: See RFC 8259 §2, RFC 8259 §4, RFC 8259 §6 · ECMA-404
Both rewrite whitespace and confirm strict syntax, not JSON Schema or application rules.
Yes. Output keeps number tokens; later parsers may round values outside JavaScript's safe range.
Pasted text and local files stay in your browser. URL import makes a request to the address you enter.
It reports a likely error location and no output. Review any changes made by JSON Repair.
Choose 2, 3, or 4 spaces in Advanced; tokens, duplicate members, and member and array order stay intact.
Limits: 2 MB input, 8 MB output, 256 nesting levels, and 200,000 JSON nodes.
Understand when to format, validate, or minify JSON, what each operation proves, and which representation changes you should review.
Diagnose common JSON syntax errors, including quotes, commas, comments, escapes, numbers, and missing delimiters, without guessing at data meaning.