Skip to content

JSON Formatter & Validator

Format, validate and minify JSON with clear error positions, optional key sorting and custom indentation.

  • Free, no sign-up
  • Runs in your browser
  • Reviewed Nov 6, 2026

How to use the JSON Formatter & Validator

  1. Paste JSON into the input box.
  2. Pick indentation and whether to sort keys.
  3. Switch between formatted and minified output, then copy.

How it works

Your input is parsed with the browser's native JSON.parse (strict RFC 8259 JSON) and re-serialised with JSON.stringify. If parsing fails, the error position is converted into a line and column. Runs entirely in your browser. Nothing you paste is uploaded or stored.

Worked examples

Find the bug

Input {"a": 1,} fails because trailing commas aren't allowed in JSON; the error points at the closing brace.

Limitations and assumptions

  • Comments, single quotes and trailing commas (JSON5 / JSONC) are rejected because they aren't valid JSON.
  • Very large numbers beyond 2^53 lose precision when re-serialised.

Frequently asked questions

Is my data safe?

Runs entirely in your browser. Nothing you paste is uploaded or stored.

G

Built and reviewed by Guru G

Calculation logic is covered by automated tests against known values. Last reviewed Nov 6, 2026. Found a problem? Let us know — see our editorial policy.