Home › Text tools › JSON Formatter
{ }
Text tool

JSON Formatter

Paste JSON to check that it is valid, then format it to read easily or minify it to save space.

Free foreverNo sign-upPrivate: runs in your browserUpdated November 2026
StatusValid JSON
{
  "site": "iamadnan.site",
  "tools": 20,
  "free": true,
  "categories": [
    "Finance",
    "Health",
    "Study",
    "Text"
  ],
  "owner": {
    "name": "Adnan",
    "country": "PK"
  }
}
Size before136 bytes
Size after195 bytes
Keys7
Nesting depth2
● calculated in 0.70 msruns in your browserupdated 07:35:39
The maths

Formula

This is the exact calculation the tool runs.

Valid JSON = keys in "double quotes", no trailing commas
Valuestext, number, true/false, null
Objects{ "key": value }
Arrays[ value, value ]
Practice

Worked examples

Click "Try it" to load an example into the tool.

Simple object

Action: Format (2 spaces)Your JSON: “{"name":"Ali","age":24,"city":"Lahore"}”
Valid JSON

Broken JSON

Action: Format (2 spaces)Your JSON: “{"name":"Ali", "age":24,}”
Shows the error

Minify a list

Action: MinifyYour JSON: “[ · 1, · 2, · 3 · ]”
Valid JSON
Step by step

How to use the JSON Formatter

Paste your JSON

From an API, a config file or anywhere else.

Pick an action

Format to read it or minify to make it small.

Fix errors

If it is invalid, the message tells you what is wrong.

Questions

Frequently asked questions

What is JSON?

A text format for storing and sending data, used by almost every website and app.

Why is my JSON invalid?

Common causes are single quotes, a comma after the last item, or missing quotes around keys.

Is my data uploaded?

No. Formatting happens in your browser.