JSON Tools

Format minified JSON (with optional tree view), check syntax and schema conformance, sort keys for stable diffs, flatten and merge objects, test JSONPath queries, and convert between JSON, CSV, YAML, and XML. These browser-based tools help with API debugging, config files, and data imports — no signup required.

JSON Tools

  • JSON Formatter

    Pretty-print minified JSON with readable indentation, or switch to tree view to explore nested structures. Uses JavaScript JSON.parse — integers beyond ±2^53−1 may lose precision.

  • JSON Stringify

    Minify formatted JSON into a compact single-line string. Paste indented JSON and click Run for API requests or environment variables.

  • JSON Syntax Checker

    Check whether JSON is syntactically valid before deploying configs or debugging API responses. Syntax check only — does not check JSON Schema (use Schema Check for structural checks). Reports parse errors, warns when integers exceed JavaScript's safe integer range, and does not flag duplicate keys (last value wins per JSON.parse).

  • JSON Sort Keys

    Alphabetically sort object keys recursively for stable diffs, cleaner configs, and predictable test fixtures. Paste JSON and click Run.

  • JSON Escape

    Escape quotes, newlines, and special characters so raw text can be embedded in JSON payloads or config files. If you paste a full JSON document, output is an escaped string literal of that text.

  • JSON Unescape

    Convert escaped JSON string values back to readable text. Paste a quoted JSON string literal, or escaped text with \n and \" sequences — unquoted input must not contain raw line breaks.

  • JSON to CSV

    Turn a JSON array of objects into CSV for spreadsheets and data imports. Flatten nested objects first for simple columns — nested values are JSON-stringified in cells.

  • CSV to JSON

    Parse CSV with a header row into a JSON array of objects. Paste CSV data and click Run to produce formatted JSON.

  • JSON Path Tester

    Run JSONPath queries against JSON data to extract nested values. Paste your JSON, enter a JSONPath expression in Tool Settings, and click Run.

  • JSON Schema Check

    Check whether JSON data conforms to a JSON Schema for local debugging. Draft support depends on your schema's $schema field — review Ajv errors before relying on results in CI.

  • JSON Schema Generator

    Infer a JSON Schema from sample JSON data. All fields present in the sample are marked required — review and tighten the draft before production use.

  • JSON Flatten

    Convert nested JSON objects and arrays into a flat key-value map with dot and bracket notation. Root-level arrays use bracket keys (e.g. [0].id) that unflatten can restore.

  • JSON Unflatten

    Restore nested JSON from flat dot-notation keys. Expects a flat object — keys with dots in original names may not round-trip perfectly.

  • JSON Merge

    Deep merge two JSON objects. Nested objects merge recursively; arrays from the second object replace the first at the same key.

  • JSON Patch Generator

    Generate an RFC 6902 JSON Patch by comparing two documents. Paste the original JSON as input, add the modified version in Tool Settings, and click Run.

  • JSON to YAML

    Convert JSON documents to YAML. Paste JSON and click Run to generate readable YAML output.

  • YAML to JSON

    Parse YAML into formatted JSON. Multi-document YAML (--- separators) converts to a JSON array. Maximum input is 512 KB — same limit as YAML format/validate tools.

  • JSON to XML

    Convert JSON to XML with a root <root> wrapper element. Round-tripping through XML to JSON will include that wrapper — paste JSON and click Run to generate XML output.

  • XML to JSON

    Parse XML into formatted JSON. Attributes appear with an @_ prefix; a single child element becomes a string, multiple siblings become an array.

  • JSON to TypeScript

    Generate TypeScript interfaces from sample JSON. Types reflect only fields in your sample — optional properties and unions need manual refinement.

  • JSON to Go

    Generate Go struct types from sample JSON. Types reflect only fields in your sample — optional fields and nested structs may need manual refinement.

  • NDJSON Lint

    Check each line of NDJSON (JSON Lines) for syntax issues. Trailing blank lines after the last record are ignored; blank lines between records are reported.

  • JSON Schema to TypeScript

    Convert a JSON Schema document into TypeScript interfaces or types. Review and refine output before use — generated types are a starting point.

Working with JSON in Development

JSON is the lingua franca of APIs

Nearly every REST API, config file, and log pipeline uses JSON. Developers spend significant time formatting minified responses, validating syntax before deploys, converting between JSON and YAML/XML/CSV, and debugging nested structures with JSONPath or schema validation.

Tools for every JSON task

  • Format & validate — pretty-print compressed logs; catch syntax errors before CI
  • Transform — sort keys for stable diffs, flatten nested objects, merge documents
  • Query — test JSONPath expressions against sample payloads
  • Schema — validate data against JSON Schema or generate a schema from examples
  • Convert — move data between JSON, CSV, YAML, and XML for imports and exports
  • Generate types — produce TypeScript interfaces or Go structs from sample JSON

Privacy for API debugging

API responses often contain user data, tokens, or internal identifiers. All JSON tools on this site run entirely in your browser — nothing is sent to a server. Paste production payloads safely when debugging locally.

Common pitfalls

  • Trailing commas are invalid in strict JSON (but valid in JSON5 and some parsers)
  • Large integers may lose precision in JavaScript — use string representations for IDs above 2^53
  • Duplicate keys in JSON objects — last value wins per the spec; validators can catch this

Frequently asked questions

What is the difference between JSON format and JSON stringify?

Formatting adds readable indentation to JSON. Stringifying minifies it into a compact single-line string — useful for API requests or environment variables.

When should I use JSON Schema validation?

Use schema validation at API boundaries, in CI pipelines, and when accepting user-submitted JSON config. It catches type errors and missing required fields before they reach production.

Can I convert JSON to YAML for Kubernetes configs?

Yes. Use the JSON to YAML converter. Review the output — YAML is more permissive than JSON and some fields may need manual adjustment for strict Kubernetes schemas.