Skip to main content
Toollabz

JSON formatētājs

Paste JSON to pretty-print or minify it. The parser runs in your browser so the document does not need to leave the device for this task.

Šī lapa tulko angļu oriģinālu. Aprēķinu dzinējs ir tas pats.

Angļu versija

Īsa atbilde

It parses the text as JSON and reprints it with indentation, or compactly, or reports the first syntax error.

Piemērs: {"a":1} becomes a two-line pretty document with an indented key.

Aprēķini atbilst šīs lapas formulai; noapaļošana un mērvienības var mainīt pēdējo ciparu. Uzskatiet rezultātu par izglītojošu novērtējumu.

* Novērtējums. Faktiskās summas var atšķirties atkarībā no pieņēmumiem.

Ko dara šis kalkulators

It parses the text as JSON and reprints it with indentation, or compactly, or reports the first syntax error.

Kam tas paredzēts

Developers checking API payloads, config files or a copied object.

Kā darbojas aprēķins

JSON.parse on the input, then JSON.stringify with a chosen indent. Errors come from the parser, not from a server.

Formula

Parse → reprint. No numerical formula.

Pieņēmumi

  • Input is text you are allowed to process locally.
  • Standard JSON, not JSON5, unless the page says otherwise.

Ierobežojumi

  • Very large documents may hit browser memory limits.
  • Does not fetch URLs for you.

Kā lietot rīku

  1. 1Paste the JSON.
  2. 2Choose format or minify.
  3. 3Fix the reported line if the parser fails.

BUJ

Why did it fail on a trailing comma?
Standard JSON does not allow trailing commas. Remove them or convert the file.
Is my data sent to Toollabz?
Formatting runs in the browser. Do not paste secrets into any third-party page if your policy forbids it.

Saistītie rīki

JSON formatēšana un pārbaude | Toollabz