JSON Formatter & Validator

Paste JSON and it is checked as you type. Errors show the exact line, column and reason; valid JSON can be formatted, minified or key-sorted. Nothing leaves your browser.

—

Common JSON errors

WrongRightWhy
{"a": 1,}{"a": 1}No trailing commas
{'a': 'b'}{"a": "b"}Double quotes only
{a: 1}{"a": 1}Keys need quotes
{"a": undefined}{"a": null}undefined is not JSON
// comment(remove)No comments

Why big numbers get changed elsewhere

JavaScript's built-in JSON.parse can't represent integers above 9,007,199,254,740,991 (253−1), so many online formatters silently turn an ID like 12345678901234567890 into 12345678901234567000. This tool re-prints every number exactly as written and tells you when such numbers are present.

What the buttons do

Frequently asked questions

Is it safe to paste private data?

Your input is processed only in this browser tab and is never uploaded or stored. As a habit, avoid pasting production secrets into any web tool.

What's the difference between JSON and a JavaScript object?

JSON is a stricter data format: keys and strings need double quotes, and trailing commas, comments, undefined and functions are not allowed.

Related tools