tools/format/json formatter
// format

json formatter

prettify, minify, validate, tree view

drag & drop · up to 5 MB (Pro: 100 MB)
— paste json to start // client-only
// output appears here

              curl -sX POST 'https://api.whittly.dev/v1/json/format' \
  -H 'Authorization: Bearer $WHITTLY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"[1,2,3]","indent":2}'
            

              const res = await fetch('https://api.whittly.dev/v1/json/format', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ input: "[1,2,3]", indent: 2 }),
});
const data = await res.json();
            

              const { data } = await axios.post(
  'https://api.whittly.dev/v1/json/format',
  { input: "[1,2,3]", indent: 2 },
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
            
// probulk formattingpro·files over 100 MBproupgrade →

// about this tool

A JSON formatter instantly prettifies or minifies any JSON string and validates it against the JSON spec. It catches syntax errors — missing commas, unquoted keys, trailing commas — and reports the exact line and character where parsing failed.

// when to use

  • Paste a minified API response to inspect its structure
  • Validate JSON config files before committing to a repo
  • Minify JSON payloads to reduce request size
  • Spot typos in manually written JSON

// faq

Why does my JSON fail validation?
JSON is strict: keys must be double-quoted strings, trailing commas are not allowed, and comments are not supported. The formatter will highlight the exact position of the error.
Is my data sent to a server?
No. All formatting and validation happens in your browser using the native JSON.parse API. Nothing leaves your tab.
// history
Pro Cloud Sync — upgrade
no operations yet