JSON Formatter

Pretty-print, minify, and validate JSON. Runs entirely in your browser.

Output

Formatted JSON will appear here…

JSON Formatter guide

The JSON Formatter turns compact, hard-to-read JSON into an indented structure you can inspect, copy and validate. It is useful when you receive an API response, webhook payload, configuration file or browser storage export and need to understand it quickly.

The formatter also minifies valid JSON when you need a smaller payload for an example, test fixture or request body. Syntax errors are reported immediately, so you can find missing commas, unquoted keys, extra braces and other common mistakes before pasting JSON into code or sending it to an API.

When to use it

How to use it

  1. Paste your JSON into the input box.
  2. Choose Pretty print to format it, Minify to remove whitespace, or Validate to only check syntax.
  3. Use the indent selector if your project prefers two spaces, four spaces or tabs.
  4. Expand or collapse nested objects and arrays when you only need a high-level view.
  5. Copy the output once the status message confirms the JSON is valid.

Example

Input

{"name":"UtilityTools","features":["format","minify","validate"],"private":true}

Output

{
  "name": "UtilityTools",
  "features": [
    "format",
    "minify",
    "validate"
  ],
  "private": true
}

The output is the same data with predictable indentation and valid JSON syntax.

Privacy

Formatting and validation happen with JavaScript in your browser. The JSON you paste is not uploaded to UtilityTools.eu, and there is no account or database storing your content.

Limitations and accuracy notes

FAQ

Can this format JavaScript objects?

Only strict JSON is accepted. Put quotes around object keys and remove comments or trailing commas first.

Does pretty printing change values?

No. Valid JSON is parsed and serialized again, so object order is normally preserved but whitespace changes.

Why does my API response fail validation?

Common causes are HTML error pages pasted by accident, a missing comma, an extra closing brace, or single quotes instead of double quotes.