JSON Formatter & Validator
Format, minify and validate JSON. View code or explore a tree.
Your JSON stays in your browserInput JSON
Result
Add your data and choose an action.
How to format and validate JSON
- 1
Add your JSON
Paste text, upload a .json file, or drop it into the editor. Files can be up to 10 MB.
- 2
Choose an action
Format with 2 or 4 spaces, remove unnecessary whitespace, or check the syntax.
- 3
Explore the result
Switch to tree view and find a key or value. Copy the result or download a JSON file.
JSON examples
{
"name": "JSONLab",
"languages": ["ru", "uz", "en"],
"free": true
}{
"name": "JSONLab",
"free": true,
}{
"id": 9007199254740993,
"precise": 0.1234567890123456789,
"large": 1e400
}Use double quotes for keys and strings. Comments and commas after the last item are not allowed.
Frequently asked questions
What does the JSON Formatter do?
It adds line breaks and indentation to make JSON easier to read. Minification removes whitespace only outside strings. Keys, values and their order are preserved.
How does the Validator show errors?
It checks syntax and reports the cause, line and column. The Go to error button selects the problem in your input. Columns are counted in UTF-16 code units.
Is my JSON sent to a server?
No. Text, uploaded files, formatting and search are processed in your browser. The service does not store JSON content or use third-party analytics. Only your theme preference is saved.
Are large numbers preserved?
Yes. Numbers are never converted to the JavaScript Number type. Values such as 9007199254740993, long decimals, 1e400 and negative zero keep their original representation.
Which files are supported?
UTF-8 .json files up to 10 MB (10 × 1024 × 1024 bytes). A leading BOM is accepted and removed from the result. A root value can also be an array, string, number, true, false or null.
Are comments and duplicate keys supported?
Comments, single-quoted strings and trailing commas are not part of JSON syntax and trigger an error. Duplicate keys are preserved, but are best avoided: different applications may interpret the same object differently.