JSON formatter and validator

Make JSON readable, check that it is valid, and see exactly where an error is. API responses and config files stay on your machine.

  • Free
  • Private
  • No sign-up
Indent
Indent
Stays on this device. Network requests since you started: 0 How to check this yourself

How your text and data are handled

  1. Your text and dataRead from your device
  2. Worked on in this tabBy code running in your browser
  3. Ready to copyNothing is stored

Never sent to a server. See how to check

How to use it

  1. Paste JSON, or open a .json file.

  2. Select Format, Minify or Validate only.

  3. Fix any error shown (the cursor jumps to it), then copy or download the result.

About this tool

The validator follows the JSON standard (RFC 8259) exactly. That makes it stricter than JavaScript: property names need double quotes, single-quoted strings are not allowed, and so are comments and trailing commas. These are the most common causes of "invalid JSON" errors when copying from code. The tool explains each error in plain words and moves your cursor to it.

Format adds indentation and line breaks. Minify removes all optional whitespace, which is useful before embedding JSON in a request. Sort keys orders object keys alphabetically so two documents are easier to compare.

Good to know

  • Numbers with more than about 15 significant digits are rounded when formatted, as in JavaScript. Validation itself is exact.
  • If an object has duplicate keys, only the last value is kept when formatting.
  • Files over about 50 MB may be slow, depending on your device.

Frequently asked questions

Why is my JSON invalid when it works in JavaScript?

JavaScript object syntax allows single quotes, unquoted keys, comments and trailing commas. Strict JSON does not. The error message tells you which rule was broken and where.

How do I find where a JSON error is?

Select Validate or Format. The error message gives the line and column, shows the line with a caret under the problem, and Go to error moves your cursor there.

Is it safe to paste API keys or customer data?

The tool runs entirely in your browser and sends nothing. Still, treat secrets carefully and avoid pasting them into any site you do not trust.

You might also need