JSON Formatter & Validator
Paste JSON to format and validate it. Valid input comes back pretty-printed with your choice of indent, plus a minified copy and stats like key count, nesting depth, and size. Invalid input gets a syntax error message instead, so you know it's broken before it hits your parser.
advanced options
returns
- data.formatted
- The JSON pretty-printed with your indent and key order.
- data.valid
- False when the input isn't valid JSON.
- data.minified
- The same JSON with all whitespace removed.
- data.stats
- Counts of keys, depth, size and each value type.
- data.error
- Syntax error message, with error_position, only when invalid.
Fill in the fields and send a request. The response lands here.
Run it from your code
A temporary key takes one request and lasts seven days at 20 calls a day. Register and it becomes 75 a day, still free.
$ curl -sX POST "https://apixies.io/api/v1/json/format" \ -H "X-API-Key: $APIXIES_KEY" \ -H "Content-Type: application/json" \ -d '{"input":"..."}' | jq '.data.formatted'
questions
Why does my JSON fail to validate?
The usual suspects are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. All of those are fine in JavaScript but not in JSON. The error message tells you what kind of problem the parser hit.
What does sort keys do?
It orders object keys alphabetically at every level. Array order isn't touched. Sorted output is handy for diffing two JSON files, since the same data then always prints the same way.