Skip to main content
FixMyTech

JSON Formatter and Validator — Format, Minify, Validate

Format, validate and minify JSON in your browser. Errors are reported with the exact line and column. Nothing is uploaded.

Paste JSON to validate, format or minify.

About this tool

Paste JSON to pretty-print it, minify it, or sort its keys alphabetically. Validation runs as you type, and when something is wrong you get the precise line and column with a caret pointing at the offending character — rather than a vague parse failure. Everything happens locally, which matters when the JSON contains API keys or customer data.

The most common use for this is debugging an API response that will not parse. The error report gives you a line and column, which is usually enough to spot the problem immediately — a trailing comma or a single quote where a double quote belongs.

The Sort keys option is useful for diffing two JSON documents that contain the same data in a different order: sort both, and a normal text diff then shows only the real differences.

What it does

  • Pretty-print with 2-space, 4-space or tab indentation
  • Minify to the smallest valid output
  • Sort object keys alphabetically, recursively
  • Errors pinpointed by line and column
  • Live validation while you type
  • Byte size and difference reported

Frequently asked questions

Is my JSON sent to a server?
No. Parsing and formatting use the browser's own JSON engine. Nothing leaves your device, which is why this is safe for payloads containing tokens or personal data.
Why does my JSON fail to parse when it looks correct?
The usual causes are a trailing comma after the last item, single quotes instead of double quotes around keys or strings, unquoted keys, or an unescaped newline inside a string. All four are valid JavaScript but invalid JSON.
Does sorting keys change my data?
No. Object key order is not significant in JSON, so sorting produces an equivalent document. Array order is significant and is always preserved.
Can it handle very large files?
Files up to a few megabytes format instantly. Above roughly 10MB the browser may pause while parsing, since the native parser is synchronous.
Does it support JSON with comments or JSON5?
No. Comments are not valid JSON and will be reported as an error. Strip them first if you are working with a config file that allows them.

Last updated .