DEV Community

Cover image for Stop Squinting at Minified JSON — Here's How to Format It Instantly
Shaishav Patel
Shaishav Patel

Posted on • Originally published at Medium

Stop Squinting at Minified JSON — Here's How to Format It Instantly

You got a JSON response from an API. It looks like this:

{"user":{"id":1,"name":"John","email":"john@example.com","roles":["admin","editor"],"settings":{"theme":"dark","notifications":true}}}
Enter fullscreen mode Exit fullscreen mode

Good luck reading that.

Now imagine the same data, properly formatted with indentation. Every key on its own line. Every nested object indented. Readable in seconds.

That is what a JSON formatter does. And it takes about two seconds to use.


What Is JSON and Why Does It Get Minified?

JSON (JavaScript Object Notation) is the standard format for sending data between systems. APIs return it. Config files use it. Browser storage holds it.

When JSON is used in production, it is often minified — all whitespace removed — to reduce file size and speed up data transfer. A 10KB formatted JSON file might be 6KB minified. Multiply that across millions of API calls and the savings add up.

The problem: minified JSON is completely unreadable to humans. When you need to debug an API response, read a config file, or understand a data structure, you need it formatted.


Format JSON Instantly — No Install Required

Go to JSON Formatter, paste your JSON, and it formats instantly as you type.

1. Paste your JSON — Drop any JSON: minified, partially formatted, copied from an API response, a log file, or a config.

2. It formats in real time — The tool validates and formats as you type. No button to press.

3. Choose your indent style — Toggle between 2-space and 4-space indentation.

4. Copy or minify — Copy the formatted output with one click, or switch to Minify mode to compress it back down.

No account. No upload. Runs entirely in your browser.


Validate JSON at the Same Time

The tool also validates your JSON in real time. If your JSON has an error — a missing comma, an extra bracket, an unquoted key — it tells you immediately.

Common JSON errors that trip people up:

Trailing commas — JSON does not allow a comma after the last item in an array or object. JavaScript does. This catches a lot of people who copy JS objects into JSON contexts.

Single quotes — JSON requires double quotes for strings. Single-quoted strings are valid JavaScript but invalid JSON.

Unquoted keys — In JavaScript you can write {name: "John"}. In JSON it must be {"name": "John"}.

Comments — JSON does not support comments. If you paste a JSON5 or JSONC file, standard JSON parsers will reject it.

The formatter catches all of these instantly.


When Would You Actually Use This?

Debugging an API response — Copy the raw response, paste it in, and read the structure clearly. Spot the missing field or unexpected nesting in seconds.

Reading a config filepackage.json, tsconfig.json, .eslintrc — paste them in and read them properly.

Checking a webhook payload — A payment provider sent a webhook. The payload is one long string in your logs. Paste it, format it, understand it.

Preparing data for an API — Format your request body first to make sure the structure is correct before you send it.

Sharing with a colleague — Formatted JSON is much easier to discuss than a minified blob.


2-Space vs 4-Space: Does It Matter?

2 spaces — More compact. Common in JavaScript projects (npm, Node.js ecosystem defaults).

4 spaces — More readable at a glance. Common in Python projects and many style guides.

Neither is wrong. The formatter lets you toggle between them.


Your JSON Never Leaves Your Browser

Unlike many online JSON tools, this formatter processes everything locally. Your JSON is never sent to a server. No logs, no storage, no third party seeing your data.

This matters when you are working with API keys in a response, user data from a production system, or internal config files with credentials.


Try It Now

JSON Formatter → ultimatetools.io

No install. No account. Works on any device.


Originally published on Medium. Part of Ultimate Tools — a free, privacy-first browser toolkit with 40+ tools.

Top comments (0)