TextArray
100% local

JSON formatter & validator

Format, minify and validate JSON, with the exact line and column of any error.

Input
Output

JSON formatter & validator

Paste JSON and this tool reformats it into something readable — or tells you exactly where it breaks. It is the everyday companion for API responses, config files, log payloads, package manifests and the minified blob you just copied out of a network tab.

Indentation is up to you: two spaces, four spaces, or tabs. Choose "Minify" instead and every optional space and newline is stripped, which is what you want before pasting a payload into a query string, an environment variable or a test fixture. Turn on "Sort object keys alphabetically" and every object in the document is reordered recursively, top level and nested alike. That makes two versions of the same config comparable in a diff, since key order stops being noise.

Validation runs on the same pass. When the input is not valid JSON you get a calm message naming the line and column of the problem alongside the parser's own reason, so a trailing comma or a missing quote takes seconds to find rather than minutes of squinting. When the input is valid, the tally confirms it and adds the numbers worth knowing: how many keys the document contains counted recursively, how deeply it nests, and how many bytes the formatted output takes.

Everything runs in your browser — no request is made and nothing is logged. That matters for JSON in particular, because payloads so often carry tokens, customer records or internal hostnames. Paste production data here without a second thought, then copy the result or download it as a file.

FAQ

What does the error message tell me?
It names the line and column where the parser gave up, plus the underlying reason. Look at that spot and just before it — a trailing comma, a missing quote or an unescaped character is the usual cause.
Does sorting keys change my data?
No. Sorting reorders the keys of every object, recursively, but values, arrays and array order are untouched. JSON objects are unordered by definition, so the document means exactly the same thing.
What is the difference between formatting and minifying?
Formatting adds indentation and newlines to make the JSON readable. Minifying strips every optional space and newline to make it as small as possible. Both produce the same data.
How are keys and depth counted?
Keys counts every object key in the whole document, including nested ones and those inside arrays. Depth is how many levels of objects and arrays are nested at the deepest point.
Is my JSON uploaded anywhere?
No. Parsing and formatting happen entirely in your browser, and your JSON never leaves your device — safe for payloads containing tokens or personal data.