JSON Formatter & Validator

Paste JSON to pretty-print it, find syntax errors with line and column, or minify it. Everything runs in your browser.

Input

Output


Paste or type something on the left.

Runs in your browser. Your data is never uploaded.

What this tool does

It parses your input with the same JSON parser your browser uses, then prints it back with consistent indentation and colors. If parsing fails, you get the exact position of the problem.

Other things you can do

Use JSON Minifier to shrink JSON for production, JSON to CSV to open data in a spreadsheet, or JWT Decoder to inspect a token.

FAQ

How do I format JSON?

Paste your JSON into the left box. It is formatted on the right as you type. Pick 2 spaces, 4 spaces or tabs for indentation.

Is my data sent to a server?

No. The formatter runs entirely in your browser with JavaScript. Your JSON never leaves your device, so it is safe to use with API responses and config files.

How do I find the error in my JSON?

If the JSON is invalid, the status bar shows the error with the line and column. Common causes are trailing commas, single quotes instead of double quotes, and unquoted keys.

Is there a size limit?

There is no limit set by this site. It depends on your browser memory. Files of a few megabytes work fine.

More tools