JSON formatter & validator

Paste JSON, get it pretty-printed or minified — with the exact syntax error position when it's broken.

How it works

Validation parses your input exactly as a browser JSON parser would — the error message includes the character position, which points at the offending comma or bracket. Sorting keys is a recursive deep sort; array order is preserved (arrays are ordered data in JSON).

Frequently asked questions

Does it handle large files?

Comfortably into the megabytes. Beyond that the textarea becomes the bottleneck — use the browser console for huge payloads.

Does sorting keys change meaning?

No — JSON objects are unordered by specification. Any consumer depending on key order was relying on implementation detail.

Written and maintained by Steven Huang · Last reviewed October 29, 2026.