How to use JSON formatter & validator
- 1
Paste or open JSON
Paste into the left box, drop a .json file on it, or use Open file. Try Sample to see how it works.
- 2
Choose the layout
Pick 2 spaces, 4 spaces or tabs, switch on Sort keys A–Z if you want stable ordering, then press Format JSON or Minify.
- 3
Fix any error
If the JSON is invalid, read the line, column and hint, jump to the spot with Go to line, or press Repair JSON.
- 4
Copy, download or explore
Copy the result, download it as .json, or open the Tree tab to fold nodes and copy a JSONPath.
Limits and Pro
Free with no sign-up: open files up to 50 MB. Input over 200,000 characters is processed in a background worker, files over 2 MB are formatted without being loaded into the editor, and the tree view covers documents up to 2 MB.
Pro removes the ads; the formatter's limits are the same on every plan. See Pro
About JSON formatter & validator
Paste an API response, a config file or a log line and this formatter checks it against the JSON standard (RFC 8259), then prints it with two-space, four-space or tab indentation, or minifies it to a single line. Keys can be sorted alphabetically, which makes two versions of the same document easy to compare.
When the JSON is broken you get the line and column, a plain-English description of what was expected, a caret under the exact spot and a likely fix: a missing comma at the end of the previous line, a trailing comma, single quotes, an unquoted property name, a comment, Python's True or None, NaN, a raw line break inside a string or an unclosed bracket. The Repair button fixes those near-JSON habits in one go and lists every change, so you can review it or undo it.
Numbers and escape sequences are copied exactly as written, so an ID like 12345678901234567890 doesn't get rounded the way JSON.parse would round it. The tree view folds objects and arrays, shows how many keys or items each one holds, and copies the JSONPath or value of any node.
Big files are handled in a background worker, so the page stays responsive while a 50 MB export is formatted. The tool doesn't validate against a JSON Schema, convert to YAML or CSV, or query data with JSONPath expressions.
Privacy
Parsing, formatting and repairing happen in this browser tab; the JSON you paste or open is never uploaded or sent to any service. Only your indentation and sort-keys choices are saved in local storage — the document itself is not kept after you close the page.
Features
Errors you can act on
Line, column, a caret under the problem and a suggested fix instead of “Unexpected token”.
One-click repair
Turns JSON with comments, trailing commas, single quotes or bare keys into strict JSON.
Collapsible tree
Fold any object or array and copy the JSONPath or value of a node.