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.

Updated 2026-08-25 · Developer

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

  1. Paste JSON: Enter or paste your JSON into the input textarea.
  2. Choose a mode: Click Format for two-space indent, or Minify for a single line.
  3. Read the result: Use the output box, or read the Invalid JSON error if parsing failed.
  4. Copy if needed: Click Copy output, or fix syntax and run the same button again.

Common use cases

Tips

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.

Related keywords

Related tools