How to use
Paste your JSON, choose options, then format/minify/sort. If the JSON is invalid, you’ll see an error.
- Paste JSON into the input box.
- (Optional) Set indent size and enable Sort keys.
- Click Pretty or Minify (or Validate for a quick check).
- Copy the output when you’re done.
FAQ
Is this JSON tool safe for sensitive data?
Yes—everything runs in your browser and the tool does not send your JSON anywhere.
What’s the difference between Pretty and Minify?
Pretty adds indentation and newlines for readability; Minify removes whitespace to make JSON as small as possible.
What does “Sort keys” do?
It sorts object keys alphabetically (recursively) so the output is stable for diffs and reviews.
Why am I getting an “Unexpected token” error?
Your input isn’t valid JSON—common causes are trailing commas, unquoted keys, or single quotes instead of double quotes.
Does sorting keys change arrays?
No—array element order is preserved; only object property order is sorted.
Can this handle large JSON?
Usually yes, but extremely large or deeply nested JSON may be slow or hit browser limits.
Will formatting change my data types?
No—the tool parses and re-serializes JSON, preserving values and types; only whitespace/key order may change.