Spincrus

Tools › JSON Formatter & Validator

JSON Formatter & Validator

Format, beautify, minify and validate JSON online. Pretty-print with custom indentation, sort keys, and get the exact line and column of syntax errors.

Runs in your browser. Nothing is uploaded.

Use it from code

The same function is available as an API endpoint. Free tier: 100 calls per day without a key. Pro lifts the limit.

curl -X POST https://spincrus.uz/api/v1/tools/json-formatter \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_KEY" \
  -d '{"text":"{\"name\":\"Ada\",\"tags\":[\"math\",\"code\"],\"born\":1815,\"address\":{\"city\":\"London\"}}","mode":"format","indent":2,"sortKeys":false}'

FAQ

What is the difference between formatting and minifying JSON?

Formatting adds line breaks and indentation so the structure is easy to read. Minifying removes all optional whitespace to make the payload as small as possible. Both produce JSON with identical data.

Why does my JSON fail validation?

The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, and missing commas between items. JSON is stricter than JavaScript object syntax. The error message shows the line and column where parsing stopped.

Is my JSON stored anywhere?

The tool runs a pure function and does not store your input. Still, avoid pasting secrets such as production tokens into any online tool.

Related tools