Format and validate JSON
Indent, minify or just check a JSON file, with the error located by line and column and the quiet problems named out loud.
Drop your files here
.json, .jsonc, .txt · up to 100 MB
How to Format JSON
- 1
Drop a JSON file
Add one file or up to twenty, up to 100 MB each. Files with comments and trailing commas are accepted as well.
- 2
Pick format, minify or validate
Format indents the document, minify strips every optional byte, and validate only reports what it finds without producing a file.
- 3
Read the report and download
Errors come with a line and column; warnings list duplicate keys and precision losses. Save the result when it looks right.
Errors with a position, not a shrug
Browsers disagree about parse errors: some report a character offset, some only a sentence, and the wording changes between versions. That is why the JSON here is read by a parser written for this tool, which always converts a failure into a line and a column. In a 40,000-object export, knowing the stray comma sits on line 8,421 is the difference between a two-minute fix and a lost afternoon.
Duplicate keys and numbers that quietly change
Two problems never surface from an ordinary parse. A key repeated in the same object is legal for most parsers, which keep the last value and say nothing; here both line numbers are shown. And an integer longer than 2^53, such as 9007199254740993, cannot be held exactly as a JSON number; it comes back one lower. Identifiers from external APIs hit this constantly, so every such literal is reported with its path.
Forgiving input, strict output
Real files arrive with // comments, /* block comments */ and a trailing comma after the last entry. All of it is readable, and all of it is rejected by every standards-compliant parser. Lenient mode accepts all of that and tells you what it removed. The output is always plain, valid JSON. Switch to strict input to prove a file is already conformant.
Your data stays in the tab
API dumps and config exports tend to contain tokens, addresses and customer records, so none of this is sent anywhere. The file is read, parsed, checked and rewritten inside your browser, with larger files handled in a worker thread. No upload, no account, no copy left behind once the tab closes.
Frequently asked questions
Why does my JSON with comments still pass?
Because the default input mode is lenient: // and /* */ comments and trailing commas are accepted, reported as warnings, and left out of the output. It is the practical choice for hand-edited config files. If you specifically need to prove a file is standard JSON, switch the input mode to strict and those same things become errors.
What does an unexpected token error actually mean?
That the parser found a character it cannot use where it is. The usual causes are a missing or extra comma, a single quote instead of a double one, an unquoted key, or a value ending too early. The message gives the line and column, so start reading a token or two before the reported position.
How do I remove all the indentation?
Choose minify. Every optional space, tab and newline is dropped and the result is one line, typically 15 to 30 percent smaller than the indented form. The parsed data is identical, so a minified file is a drop-in replacement wherever the pretty-printed one worked.
What is number precision loss?
JSON numbers are floating point, so integers above 2^53 cannot all be represented. Feed in 9007199254740993 and you get 9007199254740992 back. Long identifiers from external systems are the usual victims. Every literal with that problem is flagged along with its path, and the durable fix is for the producing API to send those IDs as strings.
Can I sort the keys alphabetically?
Yes, sorting is a switch and it applies at every level of nesting. It is most useful before comparing two exports, because it removes ordering differences that have no meaning and leaves only real changes in the diff. Key order carries no significance in JSON, so nothing is lost by sorting.
What does validate mode do differently?
It stops after checking. You get a verdict plus the full list of errors and warnings, and no file is produced for download. Use it when you only need to know whether a file is sound, such as a build artefact or an API response you are about to ship, and have no intention of rewriting it.
Does my JSON get uploaded anywhere?
No. Parsing, checking and rewriting all happen in your browser tab using code delivered with the page. There is no server that receives the text, nothing is logged, and nothing remains after you close the tab.