Skip to content

JSON formatter

Format, validate and explore JSON

Nothing yet

Formatted

This tool runs entirely inside your browser. Your files are never uploaded, never stored, and never seen by anyone but you.

What this does

Paste JSON and it is checked as you type. If it is valid you get it formatted, minified, or as a tree you can open and close. If it is not, you get the line, the column, the offending line with a caret under it, and — where the mistake is a common one — what it usually means.

Long numbers are not rounded

Most formatters read JSON with the browser's built-in parser, which turns every number into a floating-point double. An identifier like 12345678901234567890 comes back as 12345678901234567000, and formatting quietly corrupts your data. This tool keeps every number exactly as written, along with 1.50 and 1e3, because it never converts them at all.

Common mistakes it names

Trailing commas, single quotes, unquoted keys, comments, NaN and undefined — all of which are valid JavaScript and none of which are JSON. That is the usual reason a file that "looks fine" is rejected.

Duplicate keys

JSON permits the same key twice in one object, and readers disagree about which value wins. Most keep the last; some keep the first. It is flagged because it is nearly always accidental and the consequences depend on who reads the file.

Is my data sent anywhere?

No. This runs in your browser like every other tool here, which matters more than usual for this one — JSON pasted into a formatter is very often a live API response with tokens, addresses or customer records in it.

Limits

Checking happens on every keystroke up to about 400 KB; past that it waits for a brief pause instead. Very large documents are fine to format, though the tree view is more useful than a million lines of text.

Related tools