Send feedback

Coming from the page: JSON Formatter & Validator

One moment…

Errors by line & columnTree viewRuns in your browser

JSON Formatter & Validator

Paste JSON or open a file: we tidy it up and tell you exactly where an error is and why.

Everything runs in your browser: no text or file is uploaded to any server.

How to use it

1

Paste or open a file

Paste JSON into the first box, open a .json file, or drop it onto the box.

2

Read the result

Valid JSON appears formatted in the second box. If there is an error, you get the line, column and reason, and a button that takes you there.

3

Copy or download

Pick the indent or minify to one line, then copy the result or download it as a file.

Common JSON errors and fixes

JavaScript sometimes accepts these, but JSON does not:

ErrorWrongRight
Trailing comma[1, 2,][1, 2]
Single quotes{'a': 1}{"a": 1}
Unquoted key{a: 1}{"a": 1}
Leading zero{"phone": 0501234567}{"phone": "0501234567"}
Python True / None[True, None][true, null]
Comments// noteRemove them; JSON has no comments

Good to know

Big numbers stay exact. Many tools silently turn 12345678901234567890 into 12345678901234567000. Here each number keeps the exact text you wrote.

Duplicate keys. JSON technically allows them, but most programs keep only the last value. We warn you when a key repeats in the same object.

Escaped characters. If text shows up as \u00e9 or \u0627, tick “Show \u0627 as letters” to read it.

FAQ

What is JSON?

JSON is a text format for exchanging data between websites and apps: objects in { }, arrays in [ ], and text in double quotes. Most APIs use it.

How do I find the error in a JSON file?

Paste it here. You get the line and column, the reason in plain English, the line itself with a ^ under the problem, and a “Go to the error” button that selects it in the text.

Is my JSON uploaded?

No. Checking and formatting happen entirely in your browser; no text or file is sent to any server, so sensitive data is safe to check.

What’s the difference between format and minify?

Formatting puts each item on its own indented line so it is easy to read; minifying removes spaces and line breaks to make it smaller. The data is the same.

Does sorting keys change the data?

No. Key order inside an object has no meaning in JSON, and sorting makes two files easier to compare. Array order is never changed.