JSON Formatter
Validate a JSON file, then beautify it with 2-space indentation or minify it down to a single line.
Free, with no account needed. It runs in your browser, so your file never leaves your device.
Select JSON file
or drop it here · up to 25 MB
About JSON Formatter
JSON Formatter checks a JSON file and rewrites it either beautified, with two-space indentation, or minified, as a single line with no extra spaces.
Last reviewed
How to use it
- Select a .json file.
- Choose Beautify or Minify.
- Press the button and download the result.
When to use it
- Finding the error in a JSON file that an app or API refuses to load.
- Making minified API output readable before debugging it.
- Minifying JSON before storing or sending it, to save space.
Good to know
- If the file is not valid JSON, the message names the line and column of the first problem, which makes common mistakes such as a trailing comma easy to find.
- Beautify uses two spaces per level. Minify removes all the whitespace that is not needed.
- The data is not changed, only its formatting. Non-English text is kept as it is.
Tips for a better result
- The most common mistakes are a trailing comma after the last item, single quotes instead of double quotes, and missing quotes around keys.
- Go to the line and column given in the error message. The real mistake is often just before that point.
- Comments are not allowed in standard JSON. Remove them, or use YAML if you need comments.
Questions about JSON Formatter
- How do I find the error in my JSON?
- Run it through the formatter. The message gives the line and column where parsing stopped, which is usually where a comma, quote or bracket is wrong.
- When should I minify JSON?
- Before sending it over a network or storing it, when size matters more than readability.
- How much does JSON Formatter cost?
- JSON Formatter is free, and you don't need an account. It runs inside your browser, so it costs us nothing to run and there are no credits to spend.
- Is my file kept after I use JSON Formatter?
- Your file never leaves your device. JSON Formatter works inside your browser, so nothing is uploaded and there is nothing for us to keep.
- Do I need an account to use JSON Formatter?
- No. JSON Formatter works without an account or sign-up. Open the page, choose your file and download the result.
- Does JSON Formatter work on a phone?
- Yes. JSON Formatter runs in the browser on phones, tablets and computers, with nothing to install. A very large file can be slow on an older phone, because your own device does the work.
- Is there a file size limit for JSON Formatter?
- We set no upload limit, because nothing is uploaded: the limit is your device's memory. If your browser can't process a file, the page offers to process it on our servers instead. That uses credits and accepts files up to 25 MB.