Skip to content

JSON Formatter & Validator

Format, minify and validate JSON, with the exact line and column of any error and a plain explanation, plus a collapsible tree view. Your data stays on your device.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

Your JSON

Result

Errors you can actually find

Browsers report broken JSON in different words, and some give no position at all. This validator reads the text itself, so it always says where it stopped and why: "Expected a comma (,) or } but found "b"" at line 2, column 3, with the line shown and a marker under the problem.

Readable, or small

Format with two spaces, four spaces or tabs; minify for transport; sort keys for stable output. The tree view folds objects and arrays so a large response can be explored a level at a time.

Related: decode a token with the JWT decoder, or compare two JSON files with text compare (format both with sorted keys first).

Frequently asked questions

Why is my JSON invalid?

The most common causes are a trailing comma after the last item, single quotes instead of double quotes, names without quotes, comments, and a missing comma between two items. The checker names the problem and points to the exact line and column, and "Show me in the box" selects the spot.

Why does a large number change when I format it?

JavaScript, and so every browser-based formatter, stores numbers as 64-bit floating point, which keeps whole numbers exactly only up to 9,007,199,254,740,991. Longer IDs lose their last digits when parsed. The checker warns you when that would happen; keep such IDs as strings in your JSON.

What happens to duplicate keys?

JSON allows them, but almost every program keeps only the last value. The checker warns you which names repeat so you can decide which value you meant.

Is my data sent to a server?

No. Parsing and formatting happen in your browser, which matters for API responses that contain tokens, customer data or configuration secrets.

What is the difference between Format and Minify?

Format adds line breaks and indentation so people can read it; Minify removes every unneeded space so the file is as small as possible for sending or storing. Both keep the data the same, and "Sort keys" puts object names in alphabetical order, which makes two files easier to compare.