webutilkit

JSON Formatter & Validator

Format, validate and minify JSON in your browser. Files are processed locally and never uploaded.

Output

How it works

The formatter parses your input with the browser’s native JSON.parse, then re-serialises it with JSON.stringify at your chosen indentation. Because both steps run on your device, the tool works offline and your data is never transmitted.

When to use it

Reading an API response pulled from network inspector output, diffing two config files that differ only in whitespace, or checking whether a payload is valid JSON before pasting it into something less forgiving.

A worked example

Trailing commas are the most common reason valid-looking JSON is rejected. This is invalid, and the error will point at line 3:

{
  "name": "example",
  "tags": ["a", "b",],
}

Limitations

Very large documents are parsed on the main thread and may briefly block the page. JSON with comments (JSONC) and trailing commas is not valid JSON and will be reported as an error.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Files are processed in your browser and never uploaded. The formatter runs entirely as JavaScript on your device.

Why does it say my JSON is invalid?

The error message shows the exact parse failure reported by your browser, including the position where parsing stopped. Trailing commas and single-quoted strings are the two most common causes.