Free JSON Formatter & Validator
Paste JSON to pretty-print, minify, or validate it · with the exact line and position of any syntax error.
100% client-side · nothing you enter is ever sent to a server or stored.
Preview · sign in with a free account to run it
How to use it
- Paste JSON: an API response, a config file or a log line.
- Choose the indentation (2 spaces, 4 spaces or tabs), then format or minify.
- If the JSON is invalid, read the error. It names the line and column where parsing stopped.
Example
Input
{"user":{"id":42,"roles":["admin","beta"]},"active":true}Result
{
"user": {
"id": 42,
"roles": [
"admin",
"beta"
]
},
"active": true
}Errors you'll meet
- Trailing comma
- JSON doesn't allow a comma after the last item: [1, 2,] is invalid, though JavaScript accepts it.
- Single quotes
- Strings and keys need double quotes.
- Unquoted keys
- {id: 1} is JavaScript, not JSON. Write {"id": 1}.
- Comments
- Standard JSON has no comments. Remove // and /* */ before parsing.
- Large numbers
- Formatting keeps numbers exactly as written, so IDs longer than JavaScript can represent aren't rounded.
Go deeper
Page updated
Frequently asked questions
Is it safe to paste API responses with real data?
Yes · parsing and formatting run entirely in your browser. Nothing is transmitted or stored. Even so, avoid pasting secrets anywhere out of habit · and scan your app if you're not sure what your API exposes.
Why does my JSON fail with a trailing comma?
Strict JSON forbids trailing commas, single quotes, comments, and unquoted keys · all legal in JavaScript objects but not in JSON. The validator pinpoints the offending character so you can fix it fast.
Can I paste a response that contains user data?
Formatting runs in your browser and nothing is uploaded. Still, avoid pasting live customer data into any tool you don't need to.
Want the full picture?
This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.
Run a full security scanRelated tools
JSON to TypeScript
Convert a JSON payload into TypeScript interfaces · nested objects and arrays included · ready to paste into your codebase.
CSV ↔ JSON Converter
Convert between CSV and JSON in either direction · with proper handling of quoted fields, commas inside values, and headers.
Base64 Encoder / Decoder
Encode text to Base64 or decode it back · with full UTF-8 support. Handy for inspecting tokens, data URIs, and encoded config.