Relic
Get Relic free

JSON Formatter & Validator

Pretty-print, minify and validate JSON in your browser. Instant, with the line and column of any error.

Runs entirely in your browser. Nothing you type is uploaded.
indent
Input
Output
Formatted JSON appears here…

Format and validate JSON instantly

Paste raw JSON to beautify it with 2- or 4-space indentation, or minifyit to the smallest valid form. If it won’t parse, you get the exact error so you can find the stray comma or missing quote. It’s a strict parser (the same one your browser ships), so “valid” here means valid everywhere. Nothing is uploaded; your payloads stay on your machine.

Find the broken comma fast

When the parse fails, the panel under the output prints the parser’s own message plus the line and column where it gave up, so you can jump straight to the stray comma, the single quote, the unquoted key or the bracket that never closed. Browsers word that error differently, and some report only a character position, so the position is turned back into a line and a column here.

What is actually in this payload?

A valid parse also gets you a count of every object key and every array item in the document, counted all the way down through the nesting, not just at the top level. It is a quick way to see whether a response really came back with 250 records or 25, or to compare two payloads that look the same at a glance.

For the things you copy a hundred times a day

Tokens, config blobs, API responses, that one curl command. Developers copy more than anyone, and lose it just as fast. Relic is an encrypted, searchable memory for everything you copy: it auto-tags JSON, code, URLs and secrets on-device, keeps them forever, and syncs across machines, all end-to-end encrypted, open source, self-hostable. The free plan holds 250 MB and 100 saved items across 3 devices.

Frequently asked questions

How do I format or pretty-print JSON?

Paste your JSON and it is instantly re-indented with consistent spacing so nesting is easy to follow. Minify does the reverse, stripping whitespace for compact payloads.

Why is my JSON invalid?

The usual culprits: a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or a missing bracket. The validator points at the exact spot where parsing failed.

Is it safe to paste API responses with real data in here?

Yes. Formatting and validation run entirely in your browser, nothing is uploaded, so tokens and customer data in a payload never leave your machine.

What is the difference between JSON formatting and validation?

Formatting rearranges whitespace for readability. Validation checks the text is legal JSON at all. This tool does both at once: if it cannot parse, you get the error with the line and column it gave up on; if it can, you get pretty output.

Where exactly does my JSON break?

The panel under the output prints the parser's own message plus the line and column where it stopped, so you can jump straight to the spot. Browsers word that error differently and some report only a character position, so a bare position is turned back into a line and a column here.

Does JSON allow comments or trailing commas?

No. Strict JSON, which is what browsers and most APIs use, forbids both comments and a comma after the final element. Relaxed variants like JSON5 or JSONC allow them, but they are not standard JSON and will fail here, which is correct behavior.

How many keys and items are in my JSON?

A valid parse prints a count of every object key and every array item in the document, counted all the way down through the nesting rather than only at the top level. It is a quick way to check whether a response really came back with 250 records or 25.

More free tools
XML Formatter
xml formatter
SQL Formatter
sql formatter
HTML Formatter
html formatter
JSON Diff
json diff
JWT Decoder
jwt decoder
Base64 Encode / Decode
base64 decode
All tools