JSON Formatter

Pretty print, minify and validate JSON

Style

«Apply» rewrites the text with the chosen indentation or without spaces. While you type, only the syntax is checked. A BOM at the start of a file is dropped.

Why format JSON

JSON is a plain-text data exchange format. Minified JSON is convenient to transmit, but hard to read and compare. This page brings JSON into a readable form or, the other way round, removes the extra whitespace.

Processing happens only in the browser: you can work on API responses, settings and configuration files without sending them to someone else's server.

FAQ

Is the JSON sent to a server?

No. Parsing and formatting run in the browser; no request is sent to the server.

How does formatting differ from minifying?

Formatting adds line breaks and indentation to make the JSON easy to read. Minifying removes spaces and line breaks so the data takes up less space.

What JSON is accepted?

Strict JSON: double quotes, no comments and no trailing comma. Objects, arrays and single values — a string, a number, true, false and null — are supported.