About
What JSONfmt is, why it runs entirely in your browser, and how its validation and formatting actually work.
JSONfmt is a single-purpose site: paste JSON in, get it pretty-printed, minified, sorted or validated — with syntax errors pinpointed to a line and column. No sign-up, no upload, no server round-trip.
Why this site exists
Every developer has pasted a 40 KB minified blob into a formatter just to find a missing comma. Most online formatters quietly send that blob to a server — which is a problem when the blob contains API responses, tokens or customer data, as pasted JSON often does. JSONfmt does the same job with zero network activity: the parser, the error locator and the tree view are JavaScript running inside your tab. Airplane mode is the honest test — load the page, disconnect, and everything still works.
How it works
Validation is two passes: a strict grammar walk finds the first syntax error and its exact character offset (that’s what powers the line/column report and the ^ caret snippet), then the browser’s own JSON.parse produces the value. Formatting is JSON.stringify with your indent choice — 2 spaces, 4 spaces or tabs — plus an optional recursive key sort that leaves array order untouched. Byte sizes are UTF-8, measured with TextEncoder, the same units your network tab shows. The tree view expands lazily so multi-megabyte responses stay usable.
The strictness is deliberate. Comments, trailing commas and single quotes are reported as errors because they are errors in JSON — if your file has them, it’s probably JSON5 or JSONC, and the syntax-error guide will get it parseable.
Who maintains it
JSONfmt is maintained by a small independent team that builds focused utility sites. The standard is simple: results you could defend in a code review. Found an edge case we misparsed, or a message that’s confusing? Contact us — parser bugs get answered first.