JSON Formatter & Minifier

Pretty-print or minify JSON and pinpoint errors with line and column details.

Paste, run, and copy in one short flow. Input data is processed only in your browser.

Input data is never sent to a server (browser-only processing).
Safe for confidential data handling.

How to use

  1. Paste JSON into the input pane.
  2. Click Pretty or Minify.
  3. Copy the output and you are done.

Shortcuts

Ctrl/Cmd + Enter: Pretty
Ctrl/Cmd + Shift + Enter: Minify
Ctrl/Cmd + L: Clear (with confirmation)

Sample

Valid JSON formatting

Input

{"name":"Alice","age":28,"tags":["api","debug"]}

Output

Pretty: multi-line with indentation
Minify: one-line JSON

Invalid JSON

Input

{"name":"Alice","age":28,}

Output

Error banner shows line, column, and nearby snippet

What is JSON formatting?

Formatting adds indentation and line breaks for readability, making debugging and reviews easier.

What is JSON minify?

Minify removes whitespace and line breaks to reduce payload size and keep JSON compact.

Common errors and fixes

  • Trailing comma (example: {"a":1,})
  • Missing quotes around keys or string values
  • Comment tokens included (standard JSON does not support // or /* */)

FAQ

I get an error

The tool shows line, column, and nearby text. Use Jump to Error to move the cursor to the exact input location.

Can I use commented JSON (JSONC/JSON5)?

Standard JSON does not allow comments. Enable “Strip comments before parse” only when needed (not fully compatible).

Large JSON feels slow

Parsing and stringify run in a Web Worker. The UI uses size-based guards to keep input responsive.

Is data uploaded?

No. Parsing, formatting, and minifying are done locally in your browser.

I see \uXXXX output

Turn Unicode Escape off to output readable characters directly.

Related tools