JSON Formatter

Paste unreadable JSON and get it back indented, validated and navigable - or minified for shipping. Everything happens in your browser, so an API response full of customer data never leaves your machine.

Runs entirely in your browser. Nothing is uploaded.

How to use the JSON Formatter

  1. Paste your JSON

    Drop in a raw API response, a config file or a log line. Size is limited only by your browser, not by a server upload cap.

  2. Format or minify

    Format expands the structure with consistent indentation for reading. Minify strips every unnecessary byte for shipping over the wire.

  3. Fix any error it reports

    Invalid JSON is reported with the position of the problem, so you can jump straight to the trailing comma or unquoted key that broke it.

Why paste JSON into a browser tool at all?

Most JSON arrives minified: a single line thousands of characters long, which is efficient for a network and impossible for a person. Formatting it restores the structure so you can actually see which field is missing, which array is empty, and where the nesting went one level deeper than you expected.

The other half of the job is validation. A JSON parse error in an application usually surfaces as a generic failure somewhere far away from the cause. Pasting the payload here names the exact position of the problem, which is almost always a trailing comma, a single quote where a double quote belongs, or an unquoted key.

What is actually valid JSON

JSON is stricter than the JavaScript object literals it resembles. Keys must be double-quoted strings. Trailing commas are not allowed anywhere. Comments do not exist in the specification, even though many tools tolerate them. Single quotes are never valid. NaN and Infinity are not valid numbers.

These are the rules behind nearly every parse failure. If a file works in one tool and fails in another, the permissive tool is usually the one accepting comments or trailing commas as an extension - which means the file is not portable JSON, whatever it looks like.

Formatting and minifying serve different purposes

Format when a human is going to read it: reviewing an API response, checking a config into version control where a diff should be readable line by line, or attaching a payload to a bug report.

Minify when a machine is going to read it: an HTTP request body, a value embedded in an environment variable, or anything where whitespace is pure cost. Minified JSON parses to exactly the same data - the only thing lost is legibility.

Frequently asked questions

Is my JSON uploaded to a server?
No. The formatter runs entirely in your browser using the native JSON parser. Nothing is transmitted, logged or stored, which is what makes it safe to paste a production API response containing real customer data.
Why is my JSON invalid when it looks fine?
The most common causes are a trailing comma after the last item, keys without double quotes, single quotes instead of double quotes, or a comment. All four are valid JavaScript but invalid JSON.
Is there a size limit?
There is no server-side limit because nothing is uploaded. Very large files are bounded only by your browser memory; several megabytes formats without trouble on a normal machine.
What is the difference between formatting and beautifying JSON?
Nothing - they are two names for the same operation. Both mean adding indentation and line breaks so the structure is readable. Minifying is the opposite: removing all of it.