Skip to content
LocalOnly

JSON Beautifier

Stable

Turn minified or tangled JSON into clean, readable, well-indented text.

Everything is processed locally in your browser

About JSON Beautifier

The JSON Beautifier takes minified single-line blobs or inconsistently formatted JSON and rewrites it with clean, uniform indentation and line breaks. It is the fastest way to make an unreadable payload reviewable. As it beautifies, it validates the structure so malformed input is caught right away.

Features

  • Expands minified single-line JSON into a readable multi-line layout
  • Normalizes inconsistent indentation into a uniform style
  • Validates structure and reports the location of any error
  • Keeps arrays and nested objects clearly delineated
  • Preserves value types, ordering, and Unicode content
  • Copy or download the beautified output in one click

How to use JSON Beautifier

  1. 1

    Paste minified JSON

    Drop in the single-line or poorly formatted JSON you want to make readable.

  2. 2

    Beautify

    The tool re-indents the document into a clean, consistent structure.

  3. 3

    Scan the output

    Review the expanded JSON with clear nesting and line breaks.

  4. 4

    Reuse it

    Copy the readable version into your editor, docs, or a bug report.

Examples

Minified blob to readable JSON

Input

{"event":"signup","user":{"id":7,"plan":"pro"},"ts":1719800000}

Output

{
  "event": "signup",
  "user": {
    "id": 7,
    "plan": "pro"
  },
  "ts": 1719800000
}

How JSON beautification works

Beautify, format, pretty-print: one operation, three names

It is worth being straightforward about this, because the terminology causes real confusion. Beautifying JSON, formatting JSON and pretty-printing JSON are the same operation: parse the document, then write it back out with line breaks and indentation. There is no technical difference between them, and no tool anywhere produces different output for one term versus another.

The three names come from different traditions. "Pretty-print" is the oldest, borrowed from Lisp and used in `JSON.stringify`'s third parameter and in Python's `json.tool`. "Beautify" arrived from the JavaScript tooling world, where jsbeautifier and its descendants popularised the word. "Format" is what editors and language servers call it, and it is the term Prettier and the VS Code command palette use.

So if you searched for a beautifier and landed here, you are in the right place - and so would you be at the JSON Formatter. This page leans towards the readability side of the job: choosing an indentation style and knowing when indentation alone is not going to make a document readable.

Choosing an indentation width, and why it is not just taste

Two spaces is the effective default of the ecosystem. Prettier uses it, npm writes `package.json` with it, and most style guides for JSON and JavaScript settle there. If you have no reason to choose otherwise, choose two - it keeps deeply nested documents from marching off the right edge of the screen.

Four spaces is more readable at shallow depths and is conventional in Python, C# and Java projects, where surrounding code already uses it. The cost shows up in nesting: at six levels deep, four-space indentation has consumed 24 columns before any content appears, which on an 80-column diff view leaves very little room.

Tabs have one genuine advantage that spaces cannot match: each reader controls the visual width. A developer who wants a compact view sets tab width to 2, a colleague who needs more separation sets 8, and the bytes on disk are identical. That also makes tabs the accessible choice, since readers using large fonts or screen magnification can reduce indentation without editing the file. The trade-off is that tab handling still varies across tools and web views.

Whichever you pick, the value of consistency exceeds the value of the choice. Mixed indentation inside one repository produces diff noise on every touched file, which is why an `.editorconfig` at the project root is worth more than any individual preference.

When indentation is not enough

Beautifying has a ceiling. A 40,000-line formatted document is not meaningfully more usable than the minified original - you have swapped one navigation problem for another. When you find yourself scrolling rather than reading, indentation has stopped being the bottleneck.

Three things help beyond that point. Collapsing branches, so you can see the shape of a document without its contents, which is what the JSON Tree Viewer provides. Querying, so you extract the handful of fields that matter instead of reading around them - the JSON Path tool. And summarising, so you learn the depth, key counts and type distribution before deciding where to look, which is the JSON Statistics tool.

There is also a document-design point worth making. If a payload is only legible after beautifying, that is often a hint about the payload rather than about your tools: very deep nesting, arrays of thousands of near-identical objects, or keys carrying encoded data are all readability problems that formatting can only paper over.

Reference

Indentation styles compared

The same six-level-deep document, measured by how much horizontal room the indentation itself consumes.

StyleColumns used at depth 6Conventional inTrade-off
2 spaces12JavaScript, npm, Prettier defaultsThe safe default; can look cramped when shallow
4 spaces24Python, Java, C# projectsClearer when shallow, wasteful when deep
TabReader's choiceGo, Makefiles, accessibility-conscious teamsEach reader sets their own width; rendering varies by tool
None (minified)0Storage and transportSmallest, and unreadable by design

Which tool should you use?

These tasks overlap. Here is how to pick the right one for what you are actually doing.

You want readable JSON right now
This tool or the JSON Formatter - they do the same thing. Pick either.
You care most about the error message when it fails
The JSON Formatter page is oriented around validation and reports the exact line and column of a syntax error.
The beautified document is still too big to read
Indentation has hit its limit. Switch to the JSON Tree Viewer to collapse branches, or the JSON Path tool to extract only what you need.
You are standardising formatting across a repository
Use Prettier or an `.editorconfig` in your build rather than a web tool. Formatting should be enforced automatically, not applied by hand.
You need the document smaller, not clearer
The JSON Minifier performs the exact inverse operation.

Use cases

  • Making a minified production API response readable during debugging
  • Cleaning up JSON pasted from a log line into a single string
  • Reformatting third-party JSON that uses erratic spacing
  • Preparing a clear, indented snippet for a code review
  • Inspecting a compact webhook body before writing tests against it

Troubleshooting common errors

Indentation looks wrong after pasting into another editor

Why: Tab-indented output being rendered at a different tab width, or an editor converting tabs to spaces on paste.

Fix: Re-run with space indentation if the destination is unpredictable. Spaces render identically everywhere, which is precisely their advantage.

The beautified file creates a huge diff in version control

Why: The repository previously used a different indentation width, so every line has changed.

Fix: Commit the reformat as its own change with no functional edits, and add an `.editorconfig` so it does not recur. Many teams also add the commit to `.git-blame-ignore-revs`.

Beautifying fails on a config file that your editor opens happily

Why: The file is JSONC - JSON with comments. `tsconfig.json`, `.eslintrc.json` and VS Code settings all commonly contain comments.

Fix: Strip the comments before beautifying, and keep the annotated file as your source of truth. Comments cannot survive a parse-and-reserialize round trip.

Non-Latin characters render as escape sequences

Why: The source document had them escaped as `\uXXXX`, or the destination is displaying them without UTF-8 encoding.

Fix: This tool resolves escapes to real characters. If they reappear escaped, the issue is the encoding where you pasted the result, not the beautifier.

Limitations

What this tool deliberately does not do, so you know when to reach for something else.

  • Comments are removed. JSONC and JSON5 files will lose their annotations.
  • Line length is not wrapped - a single long string value stays on one long line, because breaking it would change the data.
  • Blank lines cannot be inserted between logical groups; JSON has no way to record where they belong.
  • Key order is preserved as-is. Alphabetical ordering is a separate operation.
  • Beautifying does not make an enormous document navigable - it only makes it indented.

Frequently asked questions

Learn more

Command Palette

Search for a tool or command