No Limit Tools
Tools › JSON Formatter

Tidy up JSON

Paste it in; make it readable, validate it, minify it. If it is broken, the tool tells you which line broke it.

Runs on your device Points at the broken line Minify and sort
Paste JSON the tool opens full screen

How to use it

01

Paste the JSON

Drop it into the box on the left.

02

Format, minify, sort

Choose 2 spaces, 4 spaces or a tab. Minifying puts it on one line; sorting arranges the keys alphabetically.

03

Copy or download

On broken JSON you get the line and column of the error, and the offending line is marked underneath.

Common mistakes

Trailing comma

[1, 2, 3,]

JSON does not accept a comma after the last element. JavaScript does; JSON does not.

Single quotes

{'name': 'Ada'}

JSON only uses double quotes.

Unquoted key

{name: "Ada"}

Keys have to be in quotes as well.

Comments

// note

There are no comments in JSON. This is what trips people up most often when copying out of configuration files.

Unescaped character

\" and \\

A quote or backslash inside a string has to be escaped.

Common questions

Does my data go to a server?

No. Both the parsing and the formatting happen inside your browser; the text you paste never leaves the page. That is exactly what matters when you are working with production data.

Does sorting the keys change the data?

It does not. Key order carries no meaning in JSON objects; sorting only makes it easier to read and to compare two files. Array order is left alone.

What happens with a very large file?

Your browser's memory sets the limit. Files of a few megabytes open without trouble; much larger ones may make the tab unresponsive for a while.

Related tools