JSON Beautifier

Turn one long line of JSON into readable indentation.

FREE - NO SIGN-UP - RUNS ON YOUR DEVICE

Runs in your browser tab

  • 1 pasteto read it
  • Line + colwhen it breaks
  • 0uploads
  • 1 tapto copy
Specification

JSON Beautifier at a glance

Input
The JSON you paste in
Output
Indented, readable JSON
What changes
Whitespace only, never the data
When it will not parse
The exact line and column
Method
Native parsing, in your browser
Price
Free
Account needed
None
Where processing happens
On your device
How to

How to use JSON Beautifier

  1. 1

    Paste the minified line

    Paste the minified JSON.

  2. 2

    Read the indented result

    Read the indented output.

  3. 3

    Keep the readable copy

    Copy the indented text, or save it.

Questions

Frequently asked questions

Does beautifying change my data?

No. Only whitespace is added. Keys, values, types and the order they appear in are the same afterwards, so the parsed result is identical.

My JSON will not beautify. Why?

It does not parse. A trailing comma, a single quote or an unescaped character is usually the cause, and the reported line and column points at where the parser stopped.

Can I get it back to one line?

Yes. The same panel minifies, so you can indent it to read, edit it, and strip the whitespace again before it goes back into a file.

Is my JSON uploaded to be formatted?

No. The parsing happens inside this browser tab. Nothing is sent to a server, stored in an account, or logged anywhere.

Background

Working with a long JSON line

Paste the JSON and the indented version appears in the working area. If it does not parse, you get the line and column instead of a bare failure.

  • Minified JSON is one line by design, so indentation is the fastest way to see how deep the nesting goes.
  • A parse error names the line and column, which is more useful once the text has lines to point at.
  • Indented JSON is larger on disk but identical once parsed, so keep the minified copy for anything you ship.
  • Editing is easier indented; strip the whitespace again before the file goes back where it came from.

Full specification

Specification of the JSON Beautifier tool
InputJSON pasted into the box, and the output action you want.
OutputThe same data with indentation and line breaks, ready to copy or download.
What changesWhitespace only. Keys, values, ordering and types are untouched, so nothing about the data moves.
When it will not parseThe parser reports the line and column, which points at the character that ended the parse.
MethodThe browser's own JSON parser, with line and column reporting on failure.
PriceFree. Supported by clearly labelled ads outside the working area.
Account neededNo.
Where processing happensIn your browser tab. Your input is never uploaded.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS