How it works
Paste JSON from an API response, a config file or a log. It is validated as you type: valid JSON is pretty-printed with your chosen indentation or minified to one line, and invalid JSON shows the error with its line and column so you can fix it fast.
{"a":1,"b":[2,3]} → pretty-printed with 2 spaces, or minified to a single line
Common JSON errors
- Trailing comma: a comma after the last item in an object or array is not allowed.
- Single quotes: strings and keys must use double quotes.
- Unquoted keys: every key must be a quoted string.
- Comments: standard JSON does not allow // or /* */ comments.
Tips
- Sorting keys makes two JSON files easy to compare.
- Minify before embedding JSON in URLs or HTML to save space.
- Your data stays in your browser — safe for tokens and private responses.
Standards and sources
- Validation follows the JSON standard (RFC 8259, ECMA-404)
Last reviewed October 7, 2026
Frequently asked questions
How do I find an error in my JSON?
Paste it in. If it is invalid, the formatter shows the error message with the line and column where parsing stopped.
What does minify do?
It removes all spaces and line breaks, making the JSON as small as possible for sending over a network.
Why sort keys?
Sorted keys make two JSON documents easy to compare and keep diffs in version control small.
Are comments allowed in JSON?
No. Standard JSON does not allow comments or trailing commas; remove them before validating.
Is it safe to paste API keys or tokens?
Yes. Formatting happens entirely in your browser and nothing is uploaded.