JSON Formatter

  1. Choose file
  2. Set options
  3. Get result

Formatting runs in your browser tab.

A JSON formatter turns compact or messy JSON into indented, readable text and can minify it back for APIs. GustKit's JSON Formatter also validates syntax and, when parsing fails, points to the line and column of the error. Paste a payload or open a .json file, choose 2 or 4 spaces, minify or validate, then copy or download the result. Formatting runs in your browser tab.

Format, minify, or check JSON in the tab

Paste a payload or open a .json file. Two indent buttons, Minify, and Validate sit on one page. Errors name a line and a column. Strict JSON only: no trailing comma and no comments. The result is read-only, and a large payload uses a worker.

Indent with 2 spaces or 4, or pack it

“Format (2 spaces)” and “Format (4 spaces)” pretty-print after a clean parse. “Minify” drops insignificant gaps and keeps the values. A comment or a comma after the last item fails, because the parser is strict.

A worker for a heavy payload

Big text is parsed off the main thread so the tab can stay usable. The output box cannot be typed into. Copy or download it. Take tokens and passwords out before you paste.

How to format JSON on your device

  1. Paste into the box, or press “Open .json file” and choose a file on your computer or phone.

  2. Press “Format (2 spaces)” or “Format (4 spaces)” for a tree. Press “Minify” when one line is what the API wants.

  3. Press “Validate” when you only want a verdict. A bad file names the line and the column of the first problem.

  4. The output is read-only. Copy it or download it, then close the tab. Nothing was uploaded.

JSON rewritten where you already are

  • Strict syntax

    Double quotes, no comments, no comma after the last value. That is the JSON this page accepts.

  • Line and column

    Validate points at the spot that stopped the parse, instead of a vague failure.

  • Worker on large text

    A heavy payload is handed to a worker so formatting does not freeze the page.

  • Output stays put

    You cannot edit the result in the box. Copy or download the string it produced.

  • Shown only here

    Parsing stays in the tab. Redact secrets first, because the boxes display whatever you paste.

  • One-line option

    Minify is for logs and requests. It removes gaps that do not change the data.

Questions about formatting JSON

Will a trailing comma format?

No. Strict JSON stops on that comma. Delete it, then press Format or Validate again.

Are // comments allowed?

No. Comments are not JSON. Strip them before you run the buttons.

Does Minify change numbers or keys?

No. It only removes whitespace that the grammar ignores.

Why can’t I type in the result?

The output is read-only. Copy or download when you need the text elsewhere.

What happens with a huge file?

Large payloads use a worker. Still redact tokens before they appear on screen.

Does GustKit store the JSON?

No. The parse runs in this tab and leaves when you close it.