Home › Developer Tools › JSON Formatter

JSON Formatter and Beautifier

Format, indent, sort and minify JSON. Invalid JSON is reported with the line and column of the problem.

How to use JSON Formatter

Step by step

1

Paste your code

Type or paste it into the left box, or paste a snippet from your editor.

2

Choose options

Pick the indent size or other settings. The result updates as you type.

3

Copy or download

Copy the result or save it as a file.

Features and benefits

What you get

Live result

The output updates as you type or change an option.

Private

Your code is processed in your browser by this page and is not sent anywhere.

Clear errors

Problems are reported with a short message instead of silent failure.

No sign-up

Open the page and start.

Supported formats and limitations

What to expect

Supported formats

JSON (RFC 8259)

Size limits

Limited by browser memory

Limitations

Runs fully in your browser. Very large inputs (several MB) can slow the page.

Frequently asked questions

Quick answers

Does it change my data?

No. Values are kept as they are; only spacing (and key order, if you choose to sort) changes.

Why does it say Invalid JSON?

Common causes are trailing commas, single quotes, unquoted keys or comments. Standard JSON does not allow them.

Is the JSON uploaded?

No. It is parsed in your browser.

Related tools

More from Developer Tools

Related guides

Read more about this tool