How to format JSON
Paste your JSON into the box and click "Format." The tool parses it, checks it's valid, and re-indents it cleanly for easy reading. Choose 2 spaces, 4 spaces, or tabs for indentation. If the JSON has a syntax error, the validator tells you what went wrong so you can fix it. Click "Minify" to strip all whitespace into the most compact valid form, "Copy" to copy the result, or "Clear" to start over.
Format vs minify
- Format (beautify) — adds indentation and line breaks so JSON is readable for debugging and editing
- Minify — removes all whitespace to make the smallest valid JSON, ideal for API payloads and production config
Common JSON errors
- Trailing commas — JSON doesn't allow a comma after the last item in an object or array
- Single quotes — JSON strings must use double quotes, not single quotes
- Unquoted keys — every object key must be wrapped in double quotes
- Missing brackets — every
{and[needs a matching close
Your data stays private
This formatter runs entirely in your browser using JavaScript's built-in JSON parser. Nothing is uploaded — you can disconnect from the internet and it still works. That matters when your JSON contains API keys, tokens, or other sensitive data. Need to work with text instead? Try the word counter or case converter.