Free Online ToolsMFXGJ

JSON Formatter

Minified JSON from an API is hard to read. Paste it here to format it with clean indentation — 2 spaces, 4 spaces, tabs or minified — and catch syntax errors with a message pointing at the problem. Your JSON never leaves your device, which matters when it contains real data.

How to use the JSON Formatter

  1. Paste JSON into the input box.
  2. Pick an indentation style.
  3. Select “Format” and copy the result.

Formula and method

The text is parsed with the browser’s built-in JSON parser (ECMA-404 / RFC 8259) and re-serialised with the chosen indentation. Key order from the source is preserved.

Example

Formatting the sample turns a one-line object into a readable, indented document. Use the “Load example” button above to try it with the sample inputs.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting uses JavaScript in your browser; nothing is uploaded, logged or shared. Avoid pasting secrets into any online tool you do not control — this one runs fully offline in the page.

Why did my numbers change slightly?

JSON numbers are parsed as double-precision floats. Very long integers (over 15–16 digits) can lose precision — keep IDs as strings if exact digits matter.

Can it format a JSON array?

Yes. Any valid JSON value — object, array, string, number, boolean or null — can be formatted.

Related tools