Format and validate JSON, privately
A fast JSON formatter that pretty-prints, minifies, sorts keys, and points to the exact line and column when something is malformed. It runs entirely in your browser — 0 uploads, works offline — so even a payload full of customer data never leaves your device.
How to use it
- Paste your JSON into the left pane (or press Try an example to load a sample invoice).
- Pick an indent (2 spaces, 4 spaces, or tab) and a mode — Pretty to beautify, Minify to strip whitespace.
- Tick Sort keys if you want a stable, alphabetised order for diffing.
- The formatted output updates live on the right. If the JSON is invalid, you get the error with the line and column to fix.
- Copy the result or Download it as a
.jsonfile.
FAQ
How do I format JSON for free without uploading?
Open this page and paste your JSON — it formats instantly in your browser using local JavaScript, so nothing is uploaded to any server. You can prove it: open your browser's DevTools Network tab (or switch on aeroplane mode) and format again — it still works, because there is no network request. It's free, needs no sign-up, and sets no cookies.
Does this tool upload or store my JSON?
No. The formatting happens on your device; the JSON is never sent anywhere and nothing is saved after you close the tab. That's why it keeps working with your Wi-Fi off.
What's the difference between pretty and minify?
Pretty adds indentation and line breaks so JSON is readable and diff-friendly. Minify removes every insignificant space and newline to produce the smallest valid output — useful for embedding JSON in config, URLs, or reducing payload size.
Why does it show a line and column on errors?
Invalid JSON (a trailing comma, a missing quote or bracket) can't be formatted, so instead of failing silently the tool reports the parse error with the position of the problem, so you can jump straight to the fix.
Is there a size limit?
It's built for everyday payloads — up to a few megabytes formats instantly on a normal phone or laptop. Extremely large files (tens of MB) may feel slow because formatting happens on your device; for those, a streaming or desktop tool is a better fit.
Limits
Handles standard JSON (objects, arrays, strings, numbers, booleans, null) with full Unicode, including ₹ and Indic scripts. It does not accept JSON5, comments, or trailing commas — those aren't valid JSON, and the error pointer will tell you where they are.
Related
If you're wrangling data, the JSON-to-CSV and JSON-to-YAML converters pair well with this formatter once they're live.
Bookmark this page (Ctrl+D, or ⌘D on Mac) or install the app — it works offline the next time you need it.