ToolsMaxxing

JSON formatter and validator

Format, minify and validate JSON, with the exact line and column of any error.

Your files stay on your device

How it works

  1. 1Paste your JSON into the input box, or choose Try an example.
  2. 2Pick Format, Minify or Validate.
  3. 3Read the result on the right. If the JSON is invalid, the message shows the line and column of the problem.
  4. 4Copy the output, or download it as a .json file.

What the options do

Format
Adds line breaks and indentation so the structure is easy to read.
Minify
Removes all spaces and line breaks to make the smallest possible text.
Validate
Checks the syntax only and reports whether the JSON is valid.
Indent
Two spaces, four spaces or a tab for each level of nesting.
Sort keys
Puts object keys in alphabetical order, which helps when comparing two files.

Privacy

This tool runs in your browser. The JSON you paste is never sent to a server, so API keys and private data stay with you.

Questions people ask

Is my JSON sent to a server?

No. Everything is done in your browser. You can even disconnect from the internet after the page has loaded and it keeps working.

Why does it say my JSON is invalid?

Common causes are a trailing comma, single quotes instead of double quotes, an unquoted key or a missing bracket. The message shows the line and column so you can go straight to the problem.

Does it accept comments?

No. Standard JSON does not allow comments. Remove them first, or use a format such as JSONC in your own editor.

Does sorting keys change the meaning?

No. Objects have no order in JSON, so sorting keys only changes how the text looks. Arrays are never reordered.

How large a file can it handle?

Several megabytes work fine on most devices. Very large files depend on your browser memory.

Related tools