JSON Formatter & Validator

Pretty / Minify / Validate — works on JSON and JSONC, fully in-browser

Formatted JSON appears here

🔒 This tool runs entirely in your browser — your data never leaves your device.

JSON Formatter & Validator

A fast JSON formatter and validator that runs entirely in your browser. Beautify with 2-space indentation, minify to a single line, or validate strict JSON. Relaxed mode tolerates JSONC (line / block comments) and trailing commas, common in editor configs and developer tooling.

  • Pretty-print with 2-space indentation
  • Minify to a single line for transport
  • Validate strict JSON or JSONC (relaxed mode)
  • Tolerates // and /* */ comments and trailing commas
  • Reports line and column on errors
  • Runs locally in your browser — your data never leaves the page

FAQ

Does this support JSONC (JSON with comments)?

Yes. The Format and Minify buttons first try strict JSON.parse; if that fails, they retry with comments and trailing commas removed. Validate explicitly tells you whether the input is strict or relaxed.

Will my JSON be uploaded?

No. All parsing and formatting happens locally in your browser. There is no server round-trip.

Why does Validate sometimes say 'Valid (relaxed)'?

Strict JSON does not allow comments or trailing commas. The relaxed mode accepts those for convenience, but if you need RFC 8259 compliance, your input must validate as strict.