JSON formatter

Format, validate and minify JSON. Your data stays in this tab.

Options
Indent

How it works

  1. Paste your JSON into the box.
  2. Choose 2 spaces, 4 spaces or tab for indentation.
  3. Select Format or Minify, then copy the result.

Questions

Is my JSON sent to a server?
No. Formatting happens in your browser and nothing you paste is sent anywhere, which makes it safe for tokens, config files and customer data.
How do I find the error in invalid JSON?
We show the line and column where parsing failed, with that line highlighted. Common causes are trailing commas, single quotes and missing quotes around keys.
What is the difference between Format and Minify?
Format adds line breaks and indentation so people can read it. Minify removes all unnecessary spaces so the JSON is as small as possible.
Does it change my data?
Formatting rewrites the JSON from its parsed value. Besides whitespace, numbers are written in their shortest form (1.0 becomes 1) and very large ones lose precision, escapes like \u00e9 become the character, duplicate keys keep only the last value, and numeric keys such as "1" move to the front.
How large a file can I format?
Several megabytes work fine. Above 5 MB we warn you that it may take a moment, since your device is doing the work.

Related tools