Skip to main content
Toollabz

JSON-formatter

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.

Denne side oversætter den engelske original. Beregningsmotoren er den samme.

Engelsk version

Kort svar

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

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

Beregningerne følger formlen på denne side; afrunding og enheder kan ændre sidste ciffer. Behandl resultatet som et pædagogisk skøn.

* Skøn. Faktiske beløb kan variere efter forudsætningerne.

Hvad denne beregner gør

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

Hvem det er til

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

Sådan virker beregningen

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

Formel

Parse → reprint. No numerical formula.

Forudsætninger

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

Begrænsninger

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

Sådan bruger du værktøjet

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

Ofte stillede spørgsmål

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.

Relaterede værktøjer

Formatér og validér JSON | Toollabz