JSON Formatter

Beautify, minify, and validate JSON instantly.

About the JSON Formatter

Paste raw JSON and get it back indented and readable, or collapsed to a single line for a config file. Invalid JSON is reported with the position of the problem rather than a generic failure. Everything runs in your browser tab, so API responses and payloads containing credentials never leave your machine.

How to use the JSON Formatter

  1. Paste your JSON into the input panel, or press Sample to load an example.
  2. Press Beautify to indent it, or Minify to strip all whitespace.
  3. Read the error message if the document is invalid, fix it, and run it again.
  4. Use Copy to put the result on your clipboard, or Download to save it as a file.

Frequently asked questions

Is my JSON uploaded to a server?
No. The formatter is JavaScript running in your browser tab. There is no backend to send it to, which is why it works offline once the page has loaded.
What is the difference between beautifying and minifying JSON?
Beautifying adds newlines and indentation so a human can read the structure. Minifying removes every optional byte of whitespace, which is what you want for storage or transport.
Why does my JSON fail to validate?
The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. None of those are legal JSON, though most are legal JavaScript, which is why they slip in.
Is there a size limit?
There is no fixed limit, but very large documents are bounded by your browser's memory rather than by a server quota.

Related tools