The converters cover the directions JSON usually needs to travel: CSV for spreadsheets, SQL for seed data, YAML for configuration, XML for legacy systems, and TypeScript for typed clients. Each conversion is explicit about its assumptions instead of pretending the formats map perfectly.
JSON Tools
JSON is strict on purpose, but the errors it produces are famously unhelpful: an unexpected token at position 42 can take a while to locate in a large document. A formatter that reports the line and column, plus a validator that explains what was expected, turns that guessing game into a single fix.
What people use these for
- Find the trailing comma that broke a configuration file before deploying it.
- Turn an API response into a CSV for a quick spreadsheet review.
- Generate TypeScript interfaces from a sample payload instead of typing them by hand.
- Compare two JSON documents line by line after formatting both sides.
Tools in this family
12 interactiveJSON Formatter
Format JSON with 2 or 4 spaces or tabs, validate it with precise error positions, and copy the beautified result. Handles nested objects and large documents.
JSON Validator
Validate JSON syntax and see the exact line and column of the first error. No schema validation, no uploads — just a fast, precise syntax check.
JSON Minifier
Minify JSON by stripping all optional whitespace. See the size reduction, copy the compressed output, and keep the data identical.
JSON Diff
Compare two JSON documents and highlight added, removed and changed lines. Useful for API response changes, config diffs and fixture updates.
JSON to CSV
Convert an array of JSON objects into CSV with nested keys flattened and values quoted correctly. Copy the result into Excel or Google Sheets.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements with a configurable table name. Escapes strings and keeps numbers and booleans typed.
JSON to YAML
Convert JSON into readable YAML with correct indentation, quoting and block scalars for multiline strings. Useful for Kubernetes and CI configs.
JSON to XML
Convert JSON into XML with a configurable root element. Arrays become `<item>` elements, keys are sanitized, and text is escaped.
JSON to TypeScript
Generate TypeScript interfaces from a JSON sample. Infers nested types, optional fields across array items, and union types for mixed values.
JSONPath Tester
Test JSONPath-style queries against a JSON document. Supports dot access, bracket access, array indexes and wildcards, with clear results.
JSON Escape
Escape a string for inclusion in JSON, or unescape a JSON string literal back to plain text. Handles quotes, newlines and Unicode.
Sort JSON Keys
Sort JSON object keys alphabetically, recursively, in ascending or descending order. Useful for stable diffs and deterministic fixtures.
What valid JSON actually allows
JSON permits objects, arrays, strings, numbers, booleans and null. It does not allow comments, trailing commas, unquoted keys, single-quoted strings, NaN or Infinity. Duplicate keys are syntactically legal but semantically ambiguous: most parsers keep the last value, and some reject the document. If two systems disagree about a payload, duplicate keys are a plausible culprit.
Conversions are lossy by design
CSV has no nested objects, YAML has anchors and tags that JSON cannot express, XML distinguishes attributes from child elements, and SQL needs a table shape. A converter has to choose: flatten nested keys with dots, serialize arrays as JSON strings, or repeat elements. Read the note on each tool so the output matches what the consumer expects.
Frequently asked questions
Why does JSON.parse reject a trailing comma?
The JSON specification does not allow trailing commas. JavaScript object literals do, which is why the mistake is so common when copying code into a .json file.
Can JSON contain comments?
Not in standard JSON. JSON5, JSONC and some configuration loaders allow them, but a strict parser will reject the file.
Is duplicate-key JSON valid?
It is syntactically valid but behavior is implementation-dependent. Avoid duplicate keys; if you must handle them, decide explicitly which value wins.