Quick access

JSON Formatter & Validator

Format, validate, repair, explore, and convert JSON as you type. Everything runs in your browser.

Private — data never leaves your device
Input Valid Invalid

Drop your JSON file


Paste JSON on the left — it formats as you type.

The tree appears once your JSON is valid.

Click a key to copy its JSONPath · click a value to copy it


                        

Type a JSONPath expression — results update as you type. Tip: click a key in the Tree tab to fill this in.

Keys
Objects
Arrays
Strings
Numbers
Booleans
Nulls
Depth
Input
Formatted
Minified

Clear error messages

Errors point to the exact line and column, explained in plain words — like “Trailing comma before }”.

One-click repair

Fixes comments, single quotes, unquoted keys, trailing commas, and Python True/None.

Tree, search & JSONPath

Explore big documents, search keys and values, and query with JSONPath.

No precision loss

Long IDs like 12345678901234567890 stay exact. JSON Lines and stringified JSON are read too.

About the JSON Formatter

The JSON formatter makes JSON readable by adding indentation and line breaks, checks that it is valid, and explains the exact line and column of any error.

How to use it

  1. 1 Paste JSON, upload a .json or .jsonl file, or load it from a URL.
  2. 2 It formats as you type — or press Minify, Repair, or convert it to YAML, XML or CSV.
  3. 3 Fix any errors shown, then copy, download, or share the result.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting and validation run entirely in your browser, so your data never leaves your device. Share links keep the JSON inside the link itself, not on our servers.

What are the most common JSON errors?

Trailing commas, single quotes instead of double quotes, unquoted keys, and comments. None of these are allowed in standard JSON. The Repair button fixes all of them.

What is the difference between formatting and minifying?

Formatting adds spaces and line breaks for people to read. Minifying removes them to make the file as small as possible for sending over a network.

Will long numbers lose precision?

No. Large IDs such as 12345678901234567890 are kept exactly as written, while many formatters silently round them.

Can it read JSON Lines?

Yes. A .jsonl or NDJSON file with one JSON value per line is read as an array, and JSON stored inside a string is unescaped automatically.

How does JSONPath work?

Use $ for the root. $.name reads a top-level key, $.users[0] the first item, $.users[*].email every email, and $..id every id at any depth. Clicking a key in the tree fills in its path.