JSON Formatter
Put JSON in the input box and choose Format or Minify. Format re-serializes with two-space indent. Minify collapses to a single line and reports the byte change. Bad input shows Invalid JSON plus the parser message.
Paste JSON, then Format or Minify.
About this tool
Both modes run JSON.parse in the browser, then JSON.stringify with or without indent. The old standalone minify URL now lands here. Nothing is sent to a server.
How to use
- Paste JSON: Enter or paste your JSON into the input textarea.
- Choose a mode: Click Format for two-space indent, or Minify for a single line.
- Read the result: Use the output box, or read the Invalid JSON error if parsing failed.
- Copy if needed: Click Copy output, or fix syntax and run the same button again.
Common use cases
- Expand a one-line API response so nested keys are readable.
- Shrink a pretty config before embedding it in a query string or bookmarklet.
- Spot a missing comma when the Invalid JSON message names the problem.
Tips
- Output does not auto-update while you type; click Format or Minify after edits.
- Use Copy output after a successful pass instead of selecting the textarea by hand.
FAQ
How much indentation does Format use?
Successful formatting uses two spaces per level via JSON.stringify indent 2.
Where did the minify tool go?
Minify is a button on this page. The old json-minify URL redirects here.
Does it run automatically?
No. You must click Format or Minify; typing alone leaves the previous result unchanged.
Is my JSON sent anywhere?
No. Parsing and stringifying happen in the browser on this page.