Menu

Tools

Input JSON
Formatted Output

About JSON Formatter

Paste messy, minified, or broken JSON and get clean, properly indented output. The formatter validates syntax as you type and highlights errors with line numbers so you can fix them fast.

Whether you're debugging an API response, cleaning up config files, or just trying to read a giant blob of JSON, this tool handles it. It works entirely in your browser—nothing gets uploaded anywhere.

How to use JSON Formatter

1

Paste your JSON into the input area on the left.

2

The formatter automatically validates and formats your JSON.

3

If there are errors, you'll see the line number and error message.

4

Use the minify button if you need compact output.

5

Click copy to grab the formatted result.

Examples

Formatting minified JSON

Minified JSON from an API is hard to read. Paste it and get formatted output:

// Input (minified)
{"name":"John","age":30,"city":"New York"}

// Output (formatted)
{
  "name": "John",
  "age": 30,
  "city": "New York"
}

Finding syntax errors

Missing commas and brackets are common mistakes. The formatter shows exactly where:

// Error: Missing comma after "name"
{
  "name": "John"   ← Error on line 2
  "age": 30
}

// Fixed:
{
  "name": "John",
  "age": 30
}

Nested objects and arrays

Complex nested structures become readable with proper indentation:

{
  "users": [
    {
      "id": 1,
      "name": "Alice",
      "roles": ["admin", "editor"]
    },
    {
      "id": 2,
      "name": "Bob",
      "roles": ["viewer"]
    }
  ]
}

Features

Format and beautify with customizable indentation
Minify JSON for production use
Syntax validation with error line numbers
Syntax highlighting for better readability
Copy formatted output with one click
Works offline after page loads

When to use this

  • Debugging API responses from REST or GraphQL endpoints
  • Cleaning up package.json or tsconfig.json files
  • Validating JSON before saving to a database
  • Converting minified JSON to readable format for code reviews
  • Checking for syntax errors before deploying config files

Common questions