← Back to all tools

JSON Formatter

Validate JSON syntax, format it clearly or produce compact output.

Ctrl or Cmd + Enter formats. Enter adds a new line.

Formatting and validation run in this browser. Sharing is a separate action.

Format

Add readable indentation and leave the input editable.

Minify

Remove insignificant whitespace and preserve string contents.

Validate

Check JSON syntax and leave the input unchanged.

Syntax validation does not check a JSON Schema.

Frequently asked questions

Why does my JSON show an error?

The text is not strict JSON. A missing comma, a trailing comma, a comment, a single quote, or an invalid escape stops at the reported line, column and offset. The input stays in place so you can correct it.

Can I validate without formatting?

Yes. Validate only checks syntax and does not change the input or replace the output. Format and Minify write a separate result.

Does this tool support comments or trailing commas?

No. Comments, trailing commas, single quotes and unquoted keys are rejected. They are not repaired.

Is my JSON sent to a server?

Formatting and validation run in this browser. A share link is created only after you review the input, output, action and indentation. That link stores the reviewed copy for 24 hours. The JSON is not placed in the URL query.