Back to Developer
JSON format & validate — indent, minify, error pointer

JSON format & validate — indent, minify, error pointer

Format, minify, and validate JSON entirely in your browser. Errors show the line and column. Your data never leaves your device.

developerJSONformat
Mode

Pretty-print the JSON. Indent width and sort-keys options apply.

Output

JSON stays inside your browser

How to use

Paste JSON into the textarea and click Format or Minify. Pick an indent size (2 spaces / 4 spaces / Tab) and optionally sort keys alphabetically. If parsing fails, the line and column of the error are shown so you can jump straight to the problem. Copy the formatted output with one click, or download it as a .json file. Use the Sample button to try the tool quickly.

FAQ

Is my JSON uploaded anywhere?
No. Formatting and validation run entirely in your browser — nothing is sent to any server.
Does it handle large JSON?
It uses native JSON.parse / JSON.stringify, so files up to several MB typically work fine. Very large files (tens of MB+) may freeze the page; split them into smaller chunks first.
Does it support JSON5 or JSON with comments?
No — only standard JSON (RFC 8259). Comments and trailing commas are rejected.
What does 'Sort keys alphabetically' do?
It recursively sorts object keys in ascending alphabetical order. Useful for diffing or producing canonical strings. Array order is preserved.

Related tools