Paste JSON to format it with clean indentation, minify it to one line, or check that it’s valid. If something is wrong, you’ll see the exact line and column, and a plain-English explanation of how to fix it.
Runs in your browser. Nothing you enter is sent or saved.
How to format and validate JSON
- Paste your JSON into the box.
- Click Format to indent it, Minify to remove spaces, or Validate to check it.
- If there’s an error, the tool points to the line and column and selects the problem character.
- Copy the result or download it as a .json file.
Features
- Clear error messages for common mistakes: trailing commas, single quotes, keys without quotes, unclosed strings and more.
- Indent with 2 spaces, 4 spaces or tabs.
- Sort keys A–Z to make large objects easier to compare.
- Character, line and size count for what’s in the box.
- Private: your JSON never leaves your browser, so it’s safe for API keys and customer data.
Frequently asked questions
What makes JSON invalid?
The most common causes are a comma after the last item, single quotes instead of double quotes, keys without quotes, comments, and missing brackets. This tool names the exact problem and where it is.
What’s the difference between formatting and minifying?
Formatting adds line breaks and indentation so people can read it. Minifying removes all extra spaces so the file is as small as possible for sending or storing.
Can I format very large JSON files?
Yes. Files of several megabytes work fine, because processing happens on your own device.
Is it safe to paste private data?
Yes. Nothing you paste is sent to a server or saved.
Need a custom version of this tool or an API for your business? Get in touch.