JSON formatter and validator
Paste JSON to format it with clean indentation, check it for errors, or minify it to one line.
Loading tool…
How do I format and validate JSON?
Paste your JSON and choose Format. If it is valid, it is re-indented so nested objects and arrays are easy to read. If it isn't, you'll see what went wrong and the line and column where the problem starts. The most common mistakes are trailing commas, single quotes instead of double quotes, and keys without quotes.
Minify removes all spaces and line breaks for the smallest possible size, and Sort keys puts object keys in alphabetical order, which makes two JSON files easier to compare. Everything happens in your browser, so your text is never sent to our server.
How it works
Paste your JSON
Or open a .json file.
Format, minify or validate
Errors show the line and column.
Copy or download
Save the result as a .json file.
Guide
- How to fix invalid JSON (common errors and fixes)
The most common JSON errors (trailing commas, single quotes, unquoted keys) and how to fix them, plus how to format, validate and minify JSON in your browser.
Questions
Why is my JSON invalid?
Usually a trailing comma after the last item, single quotes, a missing comma between items, or a key without double quotes. The error shows where to look.
Is my JSON uploaded?
No. It is parsed by your browser, so it is safe to paste API responses and config files.
Can it handle large files?
Yes, several megabytes work on a computer. Very large files may be slow on phones.