JSON Tools

JSON Tools

Beautify, minify, escape or tree-view JSON; repair broken JSON; flatten/unflatten nested objects; generate JSON Schema; validate data against a JSON Schema; convert between JSON and YAML, XML, a query string, or a Markdown table; generate TypeScript interfaces or C# POCO classes; compare two JSON documents; query with JSONPath or JSONata expressions. Bidirectional CSV, TSV and JSONL conversion. Also includes a Package.json Inspector to analyse npm dependencies, scripts, and issues.

Indent24

Sep

Press Ctrl+Enter to re-run the last action

JSON Tools

Beautify, minify, escape or tree-view JSON; repair broken JSON; flatten/unflatten nested objects; generate JSON Schema; validate data against a JSON Schema; convert between JSON and YAML, XML, a query string, or a Markdown table; generate TypeScript interfaces or C# POCO classes; compare two JSON documents; query with JSONPath or JSONata expressions. Bidirectional CSV, TSV and JSONL conversion. Also includes a Package.json Inspector to analyse npm dependencies, scripts, and issues.

Common uses

  • Pretty-print a minified JSON blob
  • Repair broken JSON with trailing commas or comments
  • Flatten nested JSON to dot-notation keys
  • Generate JSON Schema from a sample document
  • Validate an API response against a JSON Schema
  • Generate TypeScript types from a JSON sample
  • Generate C# POCO classes from a JSON sample
  • Diff two JSON configs side by side
  • Convert CSV to JSON
  • Convert JSON array to JSONL
  • Convert JSON to XML
  • Convert JSON to a query string
  • Convert a JSON array to a Markdown table
  • Inspect all dependencies in a package.json

Also searched as

  • json formatter and validator online
  • fix broken json with trailing commas
  • repair invalid json online
  • flatten nested json to dot notation
  • generate json schema from json sample
  • validate json against json schema online
  • json to typescript interface generator
  • json to c# class generator
  • compare two json files online
  • json to csv converter
  • convert json to jsonl ndjson
  • analyze package.json dependencies online

Frequently asked questions

How do I format (pretty-print) JSON?

Paste your JSON into the input and click Beautify. The tool re-indents the document with your chosen spacing and validates it at the same time, highlighting the exact line of any syntax error.

Can it repair broken or invalid JSON?

Yes. The Repair mode fixes common problems such as trailing commas, single quotes, unquoted keys, and JavaScript-style comments, then returns strict, valid JSON.

How do I convert JSON to another format?

Use the conversion tabs to turn JSON into YAML, XML, CSV/TSV, a query string, a Markdown table, or generate TypeScript, C#, or Java types from a sample document — all bidirectional where it makes sense.

How do I fix broken JSON with trailing commas or comments?

Use the repair option in JSON Tools. It handles problems such as trailing commas, single quotes, JavaScript-style comments and Python-style literals, then gives you valid JSON you can pretty-print.

How do I generate a JSON Schema from a JSON example?

Paste a sample document into the JSON → JSON Schema tab and the tool infers a schema from it. You can then use the Validate Schema tab to check other documents against it.

Can I generate TypeScript interfaces or C# classes from JSON?

Yes. The codegen tabs turn a JSON sample into TypeScript, C#, Java, Go, Rust, Python, Kotlin, Swift, Dart, PHP or Zod definitions. It all runs in your browser.

Can I query JSON with JSONPath or JSONata?

Yes, JSON Tools has separate JSONPath and JSONata tabs where you type an expression and see the matching result from your JSON.

How do I convert JSON to CSV, YAML or XML?

Pick the matching tab (JSON ↔ CSV, YAML, XML, TSV, query string or Markdown table), paste your data and the converted output appears. Most conversions work in both directions.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.

Related tools