Codegrain

JSON formatter, validator & beautifier — free, no upload

Free online JSON formatter & validator. Beautify, minify, prettify and lint JSON, jump to the exact error line. Runs in your browser — your JSON is never uploaded.

Action
Indent

Format, minify or validate JSON. Errors show the exact line and column.

0 chars
0 chars
All processing runs in your browser. Your JSON is never uploaded.
Frequently asked questions

Frequently asked questions

Is my JSON sent to a server?

No. Formatting, minifying and validation all happen entirely in your browser with JavaScript — your JSON never leaves your device and nothing is uploaded. That matters when your JSON holds API keys, tokens, customer records or other data you'd rather not paste into a site that logs it. Public JSON formatters have leaked exactly this kind of payload before; here it stays local.

What's the difference between Format, Minify and Validate?

Format (beautify) re-indents your JSON so it's easy to read — choose 2-space, 4-space or tab indentation, and optionally sort object keys alphabetically. Minify removes every space and line break to produce the smallest valid JSON for storage or transfer. Validate just checks whether the text is well-formed JSON and, if not, tells you the exact line and column of the first error.

Are very large numbers kept exactly?

Formatting and minifying parse your JSON as standard JavaScript values, so integers larger than 2^53 and very long decimals are rounded to the nearest double — the same behaviour as virtually every JSON tool and most programming languages. Duplicate keys collapse to the last one. If you need to preserve huge integers exactly, keep them as JSON strings. We're upfront about this rather than silently corrupting your data.

Related tools