Format · Minify · Validate · 100% in your browser
JSON Formatter & Validator
Paste JSON to pretty-print, minify or validate it. Errors are pinned to the exact line and column. Nothing is sent to a server.
How it works
Private by design
Formatting and validation run in JavaScript on your device. Your JSON is never uploaded, so it's safe to paste API responses and config files.
Exact error positions
Invalid JSON is reported with line, column and the surrounding text, so you can fix a missing comma or a stray quote quickly.
Format your way
2 or 4 spaces or tabs, minify for production, and optional alphabetical key sorting to compare two documents.
Questions
Is my data sent anywhere?
No. The formatter is plain JavaScript running in your browser tab. Nothing you paste leaves your device, which you can confirm in your browser's network tab.
Why is my JSON invalid?
The most common causes: trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments (// or /* */), and NaN, undefined or Infinity, none of which are allowed in standard JSON.
What does “sort keys” do?
It orders object keys alphabetically at every level. That makes two JSON documents with the same content but a different key order produce identical output, which is handy for diffs.
Are big numbers safe?
JavaScript numbers lose precision beyond 253 (about 9 quadrillion). Very large integer IDs may be rounded when formatted. Keep such IDs as strings in your JSON if precision matters.
More free tools
SSL Checker
Certificate validity, expiry, chain of trust, TLS versions, ciphers and post-quantum support.
Open →DNS Checker
A, AAAA, CNAME, MX, TXT, NS and CAA records, compared across Cloudflare and Google DNS.
Open →HTTP Status Checker
Status codes, every redirect hop, response time and security headers.
Open →