JSON Converter

Turn JSON into YAML, XML, CSV or TypeScript interfaces — in the browser, no upload.

Runs in your browser — nothing is uploaded

Converted output

About the JSON Converter

Four targets, each with a different job. YAML for config files and CI pipelines. XML for legacy integrations and SOAP endpoints. CSV to hand data to someone who works in Excel. TypeScript interfaces so you stop hand-typing types from a sample response.

CSV is the one that needs care: it is a flat two-dimensional format, so nesting has to be flattened first. Nested keys become dotted column names such as user.address.city, and array elements expand by index into items.0.name.

TypeScript generation walks the sample and emits one interface per nested object. It infers types from the values present, so a field that happens to be null in your sample cannot be typed accurately — check optional and nullable fields by hand.

FAQ

JSON Converter — frequently asked

How are nested objects handled in CSV?

They are flattened with dot notation before the table is built: user.address.city becomes a single column. Arrays expand by index, producing items.0.name, items.1.name and so on. If your data is deeply nested or arrays vary in length, the column count grows quickly — worth previewing before you export.

Is the generated TypeScript safe to use as-is?

It is a strong starting point, not a contract. Types are inferred from one sample, so a field that is null or absent in that sample will be typed from what it happens to contain. Review optional fields, nullable values and union types before committing the interfaces.

Why does my YAML look different from what I expected?

YAML has several valid ways to express the same structure — block style versus flow style, quoted versus bare scalars. This converter emits block style with quoting only where a value would otherwise be ambiguous. The result parses to the same data even if it does not match your existing file byte for byte.

Can I convert back from YAML or CSV to JSON?

This page converts JSON outward only. For the reverse direction use the CSV / TSV / JSON converter, which reads tabular input and rebuilds JSON records from it.

What happens to JSON types that XML has no concept of?

XML has no native types — everything becomes element text. Numbers, booleans and null all serialise as strings, so the consumer has to know the schema to interpret them. Characters that are special in XML (&, < and >) are escaped as entities.

Does converting change my data?

Structurally it is preserved, but each target format has limits. CSV loses nesting depth once flattened, XML loses type information, and YAML normalises quoting. Converting there and back will not always give you a byte-identical document.

    Report an issue