What you type stays on your device

JSON Formatter & Validator

Pretty-print, minify and validate in one place.

0 B uploaded — nothing you enter has been sent anywhere?

Unfold minified JSON and find where it breaks

One wrong comma or quote and the whole JSON fails to load. This tool checks the syntax, then expands it with 2-space indentation or squeezes it onto one line.

When it helps

Making sense of an API responseExpand a one-line response to see how deep each field sits.
Checking a config before you deployCatch a missing comma or an unclosed bracket.
Fitting JSON onto one lineMinify it to put it in an environment variable or a curl body without line-break trouble.

Common snags

The cursor landed on a character that looks fine.The parser stops where the problem becomes visible, so the real mistake is usually just before it. Look to the left of the selection.
The last digits of a long numeric ID changed.JavaScript numbers are exact only up to 9007199254740991, so larger integers are rounded. Have the API send such IDs as strings.
A config file with comments or single quotes fails.Only standard JSON is accepted. Remove JSONC or JSON5 syntax, or switch to double quotes, before checking.

Tip Format and Minify overwrite the text in the box, so copy the original first if you need it.

Notes

Is it safe for API responses and config files?

The JSON you paste is not sent over the network. Data containing tokens stays in this browser.

Does it show where the error is?

It depends on your browser. Where the browser's error message includes a position (Chrome, Edge and other Chromium browsers), it reports the approximate line number and moves the cursor to that spot. In Firefox, Safari and others it shows the browser's own error message as-is and does not move the cursor (Firefox's message does include the line and column).