Skip to content

JSON formatter & validator

Validate, format and minify JSON online for free and find the exact error with its line. Everything runs in your browser, so your data is never sent.

AvailableIn your browserInput: Text

How to use: JSON formatter & validator

  1. Paste JSON or load a file.
  2. Format with indentation or minify; errors show the line and column.
  3. Copy or download the result.

What it accepts and what you get

Input
JSON up to 2 million characters.
Output
Valid JSON, formatted or minified, with statistics.
Where your data is processed
Your data is processed in your browser and is not sent to our servers.

Limitations and notes

  • It validates JSON syntax, not a particular schema.
  • Very large numbers may lose precision when reformatted, as in any JavaScript.

Frequently asked questions

How do I validate and format JSON?

Paste the JSON: the tool tells you whether it is valid, formats it with indentation or minifies it, and shows statistics. If there is a syntax error, it points to where.

Does it validate against a JSON schema?

No, it only validates syntax. Also, as in any JavaScript, very large numbers can lose precision when reformatted.

When to use it

  • When an API response arrives on a single line and is unreadable.
  • To check that a JSON is valid before using it in your code.

Examples

Error with line and column
If a comma is missing, the error shows the line and column where it fails so you can fix it.
Minify
Choose minify to get the JSON on one line, handy for pasting into a config.

Common mistakes

  • Expecting validation against a schema: it only checks JSON syntax.
  • Pasting huge numbers and trusting every digit: as in any JavaScript, they may lose precision when reformatted.

Suggested next steps