JSON Formatter & Validator illustration

JSON Formatter & Validator

Formats messy JSON with your choice of indentation, validates it with a precise error position, minifies it for production, sorts keys, and runs JSONPath queries ($.store.book[0].title) against it — all locally in your browser. Highlights JSONPath matches in the tree, warns on duplicate keys, infers a rough JSON Schema from your sample, and exports to YAML, TOML or CSV when the shape allows.

Runs 100% in your browser — nothing you paste leaves your device.

Notes

  • The error message points at the exact line and column where parsing failed, with the offending text quoted.
  • JSONPath supports dot and bracket notation, wildcards (*), array slices and recursive descent (..).
  • Indent size and sort-keys preferences are saved in your browser.
  • Duplicate-key detection scans the raw text — JSON.parse silently keeps the last value.
  • Runs 100% in your browser — nothing you paste leaves your device.

Explore the idea

This interactive demo needs JavaScript.