Skip to content

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.

Required
Advanced options
Optional
Optional
Optional
Get an API key to automate this

Result


                    

Code snippets


                                                

                                                

                                                

                                            

What this tool checks

  • Pretty-print with 0 to 8 space indent
  • Minified output in the same response
  • Optional recursive key sorting
  • Syntax error reporting for invalid JSON
  • Stats: keys, depth, size, and value type counts

Automate this with the API

Run this tool programmatically from your code. Get a free temporary API key with 20 requests/day — or register for 75 requests/day.

curl -X POST https://apixies.io/api/v1/json/format \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"input": "..."}'

Frequently asked 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.

We use cookies for analytics to understand how our site is used. Privacy Policy