JSON Formatter & Validator

Format, validate and minify JSON, with clear error positions.

This tool runs entirely in your browser. The file you choose is never uploaded to a server. Free, with no account required.

Input
JSON text
Output
Formatted or minified JSON
Category
Developer Tools
Status
Available now
Price
Free — no subscription, no account

How to use JSON Formatter & Validator

  1. Paste JSON into the editor.
  2. Choose an indent size, or switch to Minify.
  3. Turn on "Sort keys alphabetically" if you want a stable key order.
  4. Copy or download the result. Errors show the line and column.

Frequently asked questions

Does sorting keys change the data?

No. Object key order carries no meaning in JSON. Array order is preserved exactly, because there it does matter.

How precise is the error location?

The position comes from the JSON parser itself, converted to a 1-based line and column. It points at the first character the parser could not accept.

Does it accept JSON5 or comments?

No. It uses the browser's JSON.parse, which implements strict JSON. Comments, trailing commas and single quotes are all rejected — and the error says where.

Is there a size limit?

There is no fixed limit, but very large documents are held in memory twice (input and output), so a file above a few megabytes may feel slow.

Related tools