JSON formatter and validator
Paste JSON to pretty-print or minify it, check that it is valid, and browse it as a collapsible tree. If it is invalid you get the exact line, column and a plain-English reason.
- ๐ Runs on your device
- โค 0 bytes uploaded
- ๐ด Works offline
- โ Free, no sign-up, no watermark
How to use JSON Formatter
- Paste your JSON or open a .json file.
- Choose 2 spaces, 4 spaces, tab or Minify.
- If there is an error, press Go to the error to jump to it.
- Copy or download the result, or switch to Tree view to explore it.
About JSON Formatter
JSON (JavaScript Object Notation, RFC 8259) allows objects, arrays, double-quoted strings, numbers, true, false and null. It does not allow comments, trailing commas, single quotes or undefined; those are the most common reasons JSON copied from JavaScript code fails to parse.
String values are written out exactly as in your input, so escapes such as \u00e9 are preserved.
Is it private?
Yes. JSON Formatter runs entirely in your web browser. What you type is never sent to Nolo or anyone else, and the page cannot send it anywhere: its security policy only allows it to talk to nolotools.com, which has no place to receive data. Nothing is stored either: close the page and it is gone. How Nolo works.
Questions and answers
Is my JSON sent to a server?
No. Everything runs in your browser and your JSON never leaves your device. The page is not allowed to talk to any other site, so it is safe to use with real data and secrets.
Does it change big numbers?
No. Many formatters run JSON.parse, which rounds integers above 9,007,199,254,740,991 (for example IDs like 12345678901234567890). This tool keeps every number exactly as written.
How does it find errors?
It reads the JSON with a strict parser that stops at the first problem and reports the line, the column and what was expected, such as a missing comma, a trailing comma or single quotes.
Can it read JSON with comments?
Yes. Turn on "Allow comments and trailing commas" for JSONC files such as tsconfig.json or VS Code settings. The output is always strict JSON without comments.
What does Sort keys do?
It orders the keys of every object alphabetically, at every level. Array order is never changed. This makes two JSON files easier to compare.
Does it warn about duplicate keys?
Yes. Duplicate keys are valid syntax but most programs keep only the last value, so they are listed. The formatted output keeps all of them.