Most common JSON errors
- Trailing commas โ
{"a": 1,}is valid JavaScript but invalid JSON. - Single quotes โ JSON strings and keys must use double quotes.
- Unquoted keys โ
{name: "x"}must be{"name": "x"}. - Comments โ JSON has no comments; remove
//and/* */.
When validation fails, the status line shows the line and column and the cursor jumps to the problem.
Format, minify or sort?
Format adds indentation and line breaks so you can read nested objects โ use it when debugging an API response. Minify strips every unnecessary space to make the payload as small as possible for production or for pasting into an environment variable. Sort keys orders every objectโs keys alphabetically at all levels, which makes two JSON files easy to compare in a diff tool. Press Ctrl + Enter inside the box to format quickly.
Your data stays private
The formatter uses your browserโs built-in JSON parser. Nothing is uploaded, so it is safe for API responses and config files containing tokens.
Frequently asked questions
Is it safe to paste API keys or private data?
Yes. The JSON is processed entirely in your browser and never sent to a server.
What does minify do?
It removes all spaces and line breaks to make the smallest possible JSON, which is useful for production payloads.
Can it handle large files?
Files of several megabytes work fine on a modern computer.
Last updated 2026-11-21 ยท Built by Vinayak Agarwal ยท Part of Developer & Web (77 tools)