JSON

How to Format, Validate, and Fix JSON Online

2026-06-10

Format minified JSON, catch syntax errors instantly, and use auto-fix to repair common issues — all in your browser without installing anything.


Raw JSON from APIs, config files, or log dumps is often minified or malformed. The JSON Formatter validates, pretty-prints, and auto-repairs JSON in seconds, saving you the hunt for a missing comma or mismatched bracket.

Formatting and Minifying

Paste your JSON and click Format to pretty-print it with 2 or 4 spaces of indentation. The output is immediately readable and copy-paste ready.

Click Minify to strip all whitespace and produce the smallest possible JSON string — useful before sending data over a network or embedding JSON in a build artifact.

Instant Syntax Validation

Errors are highlighted as you type. The validator reports the line and column number of the first syntax problem, making it easy to jump straight to the issue.

The error panel also shows the reason for the failure — unexpected token, unterminated string, missing comma — so you know exactly what to fix.

Auto-Fix for Common Errors

Click Auto-Fix to let the tool repair repairable errors automatically. It handles trailing commas, single-quoted strings, unquoted object keys, missing commas between properties, and more.

The fix panel shows a checklist of every change applied, so you can review what was corrected. If the JSON cannot be repaired automatically, the tool explains specifically why.

Additional Tools

Use Sort Keys to alphabetise all object keys — useful for diffing two JSON objects or enforcing a canonical key order in config files.

Click the → XML or → YAML buttons to convert the formatted JSON to those formats directly without leaving the page.


Try it free — no sign-up required

All conversions happen in your browser. Your files never leave your device.

Open Free Tool →