Small Tools
JSON utility

JSON Formatter

Format and beautify JSON with readable indentation.

● This tool runs entirely in your browser. Your input is never uploaded to our servers.
Output
Your result will appear here…

How to use JSON Formatter

  1. Paste a JSON document, not a JavaScript variable assignment.
  2. Select Format. If parsing fails, correct the reported syntax error.
  3. Inspect the indentation and copy the result.

Example

Input / settings:

{"user":{"id":7,"active":true}}

Output:

{
  "user": {
    "id": 7,
    "active": true
  }
}

When to use

Overview

JSON represents objects, arrays, strings, numbers, booleans, and null. This formatter parses JSON and serializes it with two-space indentation so nested API responses are easier to inspect.

Supported input

One complete JSON value: an object, array, string, number, boolean, or null. Comments and trailing commas are rejected.

Output details

JSON serialized with two-space indentation after parsing with JavaScript JSON.parse.

Limitations

Common mistakes

Practical tips

Privacy and security

This tool runs entirely in your browser. Your input is never uploaded to our servers. Formatting runs locally. Use redacted examples when sharing the formatted result; indentation does not remove secrets.

References

Frequently asked questions

Will it repair invalid JSON?

No. Fix the syntax first; the formatter does not guess missing values or punctuation.

Are comments preserved?

No. JSON does not accept comments, so a document containing them is rejected.

Does formatting sort keys?

It does not deliberately sort keys. JavaScript serialization can reorder integer-like property names.

Learn more

Related tools