Free online text tool

JSON Beautifier

JSON Beautifier turns minified or messy JSON into clean, indented data with one key and value per line. Paste your JSON, choose the indent, click the button and copy the result. It is free and runs in your browser.

JSON Beautifier Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

JSON Beautifier Example

Before
{"name":"John Smith","age":35,"address":{"street":"123 Main St","city":"Anytown","state":"CA","zip":"12345"},"phones":[{"type":"home","number":"555-1234"},{"type":"work","number":"555-5678"}]}
After
{
  "name": "John Smith",
  "age": 35,
  "address": {
    "street": "123 Main St",
    "city": "Anytown",
    "state": "CA",
    "zip": "12345"
  },
  "phones": [
    {
      "type": "home",
      "number": "555-1234"
    },
    {
      "type": "work",
      "number": "555-5678"
    }
  ]
}

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What is a JSON beautifier?

A JSON beautifier, also called a JSON formatter or JSON pretty printer, adds line breaks and indentation to JSON. Minified JSON, which is written on one line to save space, becomes easy to read and edit.

The tool changes only whitespace: each key and value goes on its own line, and the contents of every object and array are indented one level deeper. Keys keep their order, and strings and numbers are copied exactly as they are.

It also checks that your JSON is valid. If it is not, you see an error and your text is left untouched. Use it before you edit an API response, a config file or a data export.

JSON beautifier examples

Each key and value goes on its own line, and nested items are indented. Empty objects and arrays stay on one line. These examples use a 2 space indent.

BeforeAfter
{"a":1,"b":2}
{
  "a": 1,
  "b": 2
}
[1,2,3]
[
  1,
  2,
  3
]
{"list":[],"obj":{}}
{
  "list": [],
  "obj": {}
}
{"ok":true,"data":null,"price":12.50}
{
  "ok": true,
  "data": null,
  "price": 12.50
}

How to beautify JSON

  1. 1
    Paste your JSON
    Paste minified or messy JSON into the box, or import a text file.
  2. 2
    Choose the indent
    Pick 2 spaces, 4 spaces or a tab.
  3. 3
    Click Beautify JSON
    The JSON in the box is formatted at once. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the formatted JSON where you need it.

When to use a JSON beautifier

Good for

Reading minified API responses, checking a config file, finding a value in deeply nested data and making a diff easier to read.

Check first

Only standard JSON is accepted. Comments, trailing commas and single quotes will show an error. Keep a copy of your original data, or use Undo right after formatting.

Other tools

To format code instead of data, try the JavaScript, HTML, CSS or SQL beautifiers.

JSON beautifier FAQ

What is a JSON beautifier?

A JSON beautifier takes minified or messy JSON and adds line breaks and indentation, so every key and value is on its own line and nested objects and arrays are easy to follow. It is also called a JSON formatter or JSON pretty printer.

How do I beautify JSON?

Paste your JSON into the box, choose the indent size and click Beautify JSON. The formatted JSON replaces the text in the box. Click Copy to use it, or Undo to go back.

Does it change my data?

No. The tool only changes whitespace. Keys stay in the same order, and strings, numbers, true, false and null are copied exactly as you wrote them, including very large numbers.

What happens if my JSON is not valid?

The tool shows an error message and leaves your text as it is. Common causes are a trailing comma, single quotes instead of double quotes, keys without quotes, and comments, none of which are allowed in JSON.

What is the difference between beautifying and minifying JSON?

Beautifying adds spaces and line breaks to make JSON readable. Minifying removes them to make the data smaller. Use a beautifier when you want to read or edit JSON, and a minified version when you send it over a network.

Which indent size can I choose?

You can choose 2 spaces, 4 spaces or a tab. Two spaces is a common choice for JSON, but use whatever your project requires.

Does it sort the keys?

No. Keys are kept in the order you gave them.

Does it work with JSON5, JSON with comments or JSON Lines?

No. It accepts standard JSON only, so JSON5, JSON with comments and files with one JSON value per line will show an error. Beautify each value separately.

Is this tool free and is my data private?

Yes. It is free, needs no account and runs in your browser, so your JSON is not uploaded to a server.

Looking for more text tools?

Browse Formatter Tools

Last updated: 26 October 2026