Text & data TOOL

Format & validate JSON

Format complex JSON and find syntax errors.

01

Enter your text

On-device processing
Input · Up to 2 MB
02

Output options

No account. No uploads.

Format & validate JSON · How to use

Format complex JSON and find syntax errors.

Example

Enter {"name":"Poptools","local":true} to format indentation and check syntax.

Things to know

Use standard JSON. Comments and trailing commas are not valid JSON syntax.

Your files and results are never sent to a server. Everything is processed in this browser.

How to format JSON and check its syntax

Read a single-line API response or check a JSON configuration file. Valid JSON is formatted with your chosen indentation; invalid syntax produces a conversion error.

When to use this tool

  • Pretty print a single-line API response
  • Check JSON configuration syntax
  • Remove unnecessary formatting whitespace from valid JSON

Step-by-step instructions

  1. Paste the JSON text you want to format or validate.
  2. Choose 2 spaces, 4 spaces, or compact output without formatting whitespace.
  3. Choose Convert. If an error appears, correct the input syntax.
  4. Copy the formatted JSON or download it as a file.

Frequently asked questions

Does this JSON validator accept comments or trailing commas?

No. It accepts standard JSON. Comments and trailing commas are invalid, and strings and property names must use double quotes.

Can I minify JSON without whitespace?

Choose compact output in the indentation options. Spaces inside strings remain part of your data, while formatting spaces and line breaks are removed.

Are large JSON numbers preserved exactly?

The tool uses the browser's JSON.parse and JSON.stringify. Numbers beyond JavaScript's safe integer range can lose precision. Enter identifiers that must be exact as strings. Input text is supported up to 2 MB.

Save only the tools you need.