Developer and design
JSON formatter and validator
Format, validate and minify JSON in your browser. Errors are shown with the exact line and column, and keys can be sorted.
- Free
- No signup
- Nothing stored
Result
Paste JSON on the left. The formatted result, or the exact error, appears here.
Why use it
API responses, config files and logs are easier to read when JSON is indented, and smaller to send when it is minified. This formatter does both and tells you exactly where invalid JSON breaks.
It runs entirely in your browser, so you can paste responses that contain customer data or tokens without sending them to a third-party server.
How to use it
- Paste your JSON.
- Choose Format for readable output or Minify for the smallest size, and pick the indentation.
- Turn on Sort keys to compare two objects more easily.
- Copy or download the result. If the JSON is invalid, the error shows the line and column to fix.
How it works and its limits
- Input must be strict JSON: double-quoted keys and strings, no comments and no trailing commas.
- Sorting keys reorders object keys alphabetically at every level; array order is never changed.
- Very large numbers beyond JavaScript’s safe integer range may lose precision.
- Nothing you paste is uploaded or stored.
Questions
Why is my JSON invalid?
The most common causes are single quotes instead of double quotes, a trailing comma after the last item, unquoted keys and comments. The error message points to the first problem it finds.
Is it safe to paste API responses here?
Yes. The formatter runs in your browser and does not send your data anywhere. You can check by using it offline once the page has loaded.
What does minify do?
It removes all whitespace that is not inside strings, which makes the JSON smaller to store or send without changing its meaning.