JSONCraft — JSON Formatter & Validator Online

Free, open-source, 100% client-side JSON formatter and validator. Format, minify, auto-repair, diff, query (jq/JSONPath), and convert JSON to YAML, TOML, XML, or CSV — all in your browser. Your data never leaves your device.

Format and validate JSON in your browser

JSONCraft is a developer utility that formats, prettifies, and validates JSON documents entirely on your device. Paste a JSON payload, hit format, and get a syntax-highlighted tree view with collapsible nodes and precise line-number error reporting on any invalid input. Because the entire tool is static assets — HTML, JavaScript, and WebAssembly — nothing is ever uploaded to a server.

Auto-repair malformed JSON

Config files, JavaScript objects pasted from source, and hand-written JSON often fail strict parsers. JSONCraft automatically repairs common defects: block and line comments, trailing commas, single-quoted strings, and unquoted object keys. The repaired document is shown alongside the original so you can confirm the fix before copying.

Query with jq and JSONPath

Run jq expressions and JSONPath selectors against the loaded document. The jq engine runs in a Web Worker, so large documents and complex pipelines never block the UI. Query results update live as you type.

Convert and generate types

Convert JSON to YAML, TOML, XML, or CSV with one click. Generate TypeScript interfaces, Zod schemas, JSON Schema definitions, or Go structs directly from a sample document — ideal for scaffolding API clients and validation layers.

Frequently asked questions

Is JSONCraft really 100% client-side?

Yes. The entire app is static assets — HTML, JS, and WebAssembly. There is no backend, and the app makes zero network requests after load. Open DevTools and see for yourself.

Is JSON Formatter free?

Free and open source under the MIT license. No accounts, no paywalls, no premium tier. The source code is on GitHub.

How does jq run in the browser?

A jq engine runs in JavaScript within a Web Worker. Queries evaluate against your in-memory document; no data is transmitted anywhere.

Can I use JSON Formatter offline?

Yes. JSONCraft works offline — open it once and it works on planes, trains, and air-gapped machines.

How does share-as-URL keep data private?

Encoded data lives in the URL fragment (after #), which browsers never send to servers. The recipient decodes it locally.

What's the difference between a JSON formatter and a JSON validator?

A formatter pretty-prints valid JSON for human reading. A validator checks that the input conforms to the JSON spec (RFC 8259) and reports syntax errors with location details. JSONCraft does both in the same pass.

Open source

JSONCraft is maintained on GitHub under the MIT license. Issues and pull requests welcome.