How to Use
- Paste JSON into the editor, or drop a JSON/JSONC/NDJSON file.
- Choose an action: Format / Minify / Validate / TS / Zod / XML.
- Copy or download the output, or open the Diff to audit changes.
- If validation fails, fix the line/column hint and generate types again.
Core Features
- Format JSON with pretty print for readability and review.
- Minify JSON to reduce payload size for transport and storage.
- Validate syntax and highlight the exact line/column of errors.
- Generate TypeScript interfaces and Zod schemas from real JSON data.
- Convert JSON to XML for legacy systems and integrations.
- Compare changes with a Diff viewโeverything stays local and private.
Related Tools
Free JSONPath tester and evaluator for API JSON. Extract matching nodes in real time, inspect paths, and copy JSON results while parsing stays local in your browser.
Convert JSON objects or arrays to CSV locally in your browser. Flatten fields, preview the result, then copy or download CSV without uploading data.
Convert CSV text or files to JSON arrays locally in your browser. Supports headers, comma/semicolon/tab delimiters, drag-and-drop files, copy, and download with no uploads.
Compare two JSON documents locally in your browser. Sort object keys for a semantic diff, ignore key-order noise, and mark added, removed, and modified fields without uploads.
Minify JSON into one line, remove indentation and line breaks, and compare original size, minified size, saved bytes, and saved percentage.
Free online JSON to TypeScript converter. Instantly generate TypeScript interfaces and types from your JSON payloads. 100% private, client-side code generation.
Convert YAML to formatted JSON locally in your browser. This developer tool supports live conversion, multi-document YAML, line-aware errors, copy, and JSON download without storing data.
Convert JSON to YAML locally in your browser with live conversion, strict JSON validation, error details when available, copy, and YAML download. No data is uploaded.
Calculation Logic
- Parsing uses
JSON.parse; rendering usesJSON.stringify. - Type generation walks objects/arrays recursively and maps fields to TS/Zod syntax.
- Diff rendering can be built with an LCS-based text diff algorithm.
- Heavy work can run inside a Web Worker to keep the UI responsive.
FAQ
- Is it free? Any limits?
- Yesโformatting, validation, TS/Zod generation, XML conversion, and diff are free to use.
- Is my data private? Do you upload JSON?
- No uploads. Everything runs locally in your browser, including sensitive keys.
- How do I convert JSON to TypeScript interfaces automatically?
- Paste JSON and click TS to generate strict interfaces instantly.
- Why does
JSON.parsefail on โvalid-lookingโ JSON? (Technical)- Common causes include trailing commas, unquoted keys, single quotes, comments (JSONC), or missing braces/brackets.
- Why generate a Zod schema from JSON?
- Zod adds runtime validation so your app can safely detect API shape changes.