JSON Formatter

Make your JSON readable

Format, minify and validate JSON without losing big numbers.

Free, private, no sign-up

Was this tool helpful?

Format, minify and validate JSON

Paste JSON, open a file or drop one onto the editor. Format pretty-prints it with 2 spaces, 4 spaces or tabs. Minify removes every space and line break outside strings, and Sort keys orders object keys alphabetically at every level. Errors are underlined in the editor, with the exact line and column.

Your numbers stay exact

Many online formatters run your JSON through JSON.parse, which quietly rounds large numbers: 12345678901234567890 becomes 12345678901234567000. This formatter works on the text itself, so IDs, amounts and long decimals come out exactly as they went in.

Good to know

Is my JSON uploaded anywhere?

No. Everything runs in your browser. Nothing you paste or open is sent to a server.

Why are comments and trailing commas errors?

Standard JSON doesn't allow them. The validator follows the JSON standard strictly, so what passes here will parse everywhere.

How are keys sorted?

Alphabetically by character code, at every level. Arrays keep their order, and duplicate keys are kept in place.

How big can my file be?

Up to 10 MB. Files over 1 MB are processed in the background, so the page stays responsive.

Is there a keyboard shortcut?

Yes. Press Ctrl+Enter (Cmd+Enter on a Mac) in the editor to format.