Live
No signup

JSON Formatter

Format, validate and minify JSON.

Input

Paste your JSON. We validate instantly.

96 chars · 96 bytes

Output

{
  "name": "Zona Utility",
  "live": true,
  "tools": [
    "json",
    "base64",
    "jwt"
  ],
  "version": 1
}
114 chars · 114 bytes+19%

How this tool works

JSON (JavaScript Object Notation) is the most-used data interchange format in modern APIs. A single misplaced character breaks the whole document, and native parser error messages are often cryptic.

This formatter uses JavaScript's standard parser to validate your JSON, shows the exact error location and offers three outputs: pretty (readable indent), compact (single line for production), sorted (alphabetical keys for diffs).

How to use it, step by step

  1. 1

    Paste your JSON

    Any API response, config file or webhook payload.

  2. 2

    Pick a mode

    Pretty to read; Compact for production; Sorted to diff two objects.

  3. 3

    Fix errors

    On error we point to line and column. Common culprits: trailing commas, single quotes, unquoted keys.

Use cases

  • Debug API responses
  • Clean webhook payloads (Stripe, GitHub, Slack)
  • Compare two objects before/after a deploy
  • Convert pretty JSON to compact to fit in an env var
  • Verify manifest.json, package.json or tsconfig.json

Frequently asked questions

Does my data leave the browser?
No. Formatting and validation happen with JSON.parse and JSON.stringify entirely client-side.
Does it support comments or trailing commas?
Standard JSON doesn't allow them. If your file is JSONC (config with comments), strip them before pasting.
Maximum size?
Limited by browser memory. Up to ~50MB usually works fine in modern Chrome.
Why does my JSON say bad quotes?
JSON only accepts double quotes ("). If you copied from Word, Slack or JSON5, replace singles (') with doubles.