Formatear minified JSON so it can be read (and diffed)
Turn un one-línea API respuesta en indented JSON, con precise error locations cuando el entrada es no válido JSON at todo.
- 1 Formateador JSON →
Paste the minified JSON. Choose indent size in the options (2 spaces is the ecosystem default). The output is safe to paste into a diff or PR review.
- 2
If formatting fails, the input is not valid JSON — the tool reports the exact line and column (common culprits: trailing commas, unquoted keys, single quotes, NaN/undefined values). Fix the source, not the formatter: JSON.stringify-level strictness is what every consumer will apply.
- 3 Validador JSON →
Validation-only pass when you just need a yes/no with the error position, without producing formatted output.
- 4
For large responses, remember everything runs locally in this tab — there is no size ceiling from an upload limit, only your browser's memory. Minified payloads of several megabytes format in well under a second.
Preguntas frecuentes
- Does pretty-printing change the data?
- No. Formatting only changes whitespace between tokens. The parsed values are identical, and re-minifying restores the semantics exactly (key order is preserved too, per JSON object semantics).
- Can I sort the keys instead?
- Key sorting is a different transformation (useful for stable diffs). This formatter preserves original key order by design — sorting silently changes what a diff means.