JSON Formatter
Paste JSON to pretty-print it with 2 or 4 spaces or tabs, minify it to one line, or validate it. Errors show the exact line and column. Big numbers and key order stay exactly as written. Copy or download the result as a .json file.
Input JSON
Result
How it works
- Paste your JSON into the left box, or open a .json file.
- Press Format to beautify, Minify to squeeze it onto one line, or Validate to just check it.
- If there’s an error, jump to the highlighted line and fix it. Then copy or download the result.
FAQ
Is my JSON uploaded anywhere?
No. Formatting and validation run entirely in your browser, so it’s safe for API keys, configs and private data.
Why does my JSON fail to validate?
The most common causes are trailing commas, single quotes instead of double quotes, keys without quotes, and comments. Standard JSON allows none of these.
Will large numbers lose precision?
No. Unlike many formatters, numbers are kept exactly as you typed them, so long IDs like 12345678901234567890 don’t get rounded.