JSON Formatter

JSON Formatter and Validator

Paste JSON to check whether it is valid, then pretty-print it or minify it to one line. If there is a syntax error, the tool shows the line and column and explains what is wrong. Your data never leaves this page.

Paste or type JSON to check it.

  • Numbers and strings are output exactly as written, so long numbers are not rounded.
  • JSON5 and JSON with comments are not supported. Comments and trailing commas are reported as errors.
  • Everything is processed in your browser. Nothing you paste is sent or saved.

About this tool

Paste JSON to check whether it is valid, then pretty-print it or minify it to one line. When there is a syntax error, the tool shows the line and column and explains the cause, such as a missing comma, a trailing comma or single quotes. Choose 2 spaces, 4 spaces or tabs for indentation and optionally sort keys. Your JSON is processed in your browser and never sent to a server.

How to use

  1. Paste JSON into the JSON box on the left, or click Sample to try it.
  2. Below the box you will see Valid JSON, or the line, column and cause of the error, with the problem character marked.
  3. Choose the Indent and whether to sort keys, then click Format or Minify.
  4. Copy the Result on the right, or click Download to save it as a .json file.

Useful for

  • Reading API responses in a readable layout
  • Finding mistakes in configuration files such as package.json
  • Checking structured data (JSON-LD) before publishing
  • Minifying data to make it smaller

FAQ

What does formatting JSON do?

It adds line breaks and indentation so the structure is easy to read. The data itself does not change.

How do I find where a JSON error is?

The tool shows the line and column of the error, displays that line with the problem character marked, and explains what is wrong in plain words.

Does it support JSON with comments or JSON5?

No. Comments and trailing commas are reported as errors.

Is my data sent anywhere?

No. Everything is processed in your browser and nothing is saved.

Contact