JSON Formatter and Validator: Fix Broken JSON Online
Paste your JSON and see it as clean, readable text. If something is wrong, the formatter shows exactly where, and can often fix it for you.
JSON on a single long line is almost impossible to read, and one missing comma can stop an app from loading the file. Hunting for the mistake by eye wastes time.
The JSON Formatter adds clean indentation, or squeezes your JSON into one short line when you need a small file. If the JSON is invalid, it shows the line and column and points at the problem.
Auto-fix repairs the mistakes people make most often: comments, trailing commas, single quotes and keys without quotes. It keeps your key order and your big numbers exactly as you wrote them.
How to use the JSON Formatter: step by step
- Open the JSON Formatter.
- Paste your JSON, or upload a .json file.
- Choose Beautify to make it readable, or Minify to make it small.
- If you see an error, click Auto-fix and format, then copy or download the result.
When to use the JSON Formatter
- Reading an API response
- Finding out why a config file will not load
- Cleaning JSON copied from a chat or document
- Making a small file for production
Tip: Tick "Sort keys A to Z" to make two JSON files easy to compare.