Data

JSON Converter

Paste JSON, CSV, YAML, TOML, XML or a query string — get it back in any other format, or as TypeScript and Zod types.

Paste data to begin
Input —
or drop a file here
Output —
Converted output will appear here
Settings 2-space indent · comma · flatten
How It Works

How to Use JSON Converter in 3 Steps

1

Paste or open your data

Drop a .json, .csv, .yaml, .toml or .xml file, or paste text. The input format is detected automatically — pick it under From if the guess is wrong.

2

Pick the output

Choose JSON, CSV, YAML, TOML, XML, query string, Markdown table, TypeScript types or a Zod schema. The result updates as you type; ⇄ swaps the direction.

3

Copy or download

Copy the result or download it with the right file extension. Settings cover indentation, CSV delimiter, flattening and type names.

FAQ

JSON Converter — Frequently Asked Questions

How are nested objects turned into CSV?

With “Flatten” on (default), nested keys become dot columns — {"a":{"b":1}} becomes a column a.b. Arrays inside a row are written as JSON text. Turn Flatten off to keep whole objects as JSON in one cell.

Which libraries are used for YAML and TOML?

YAML uses js-yaml and TOML uses smol-toml. Both are downloaded from a pinned CDN link only when you pick that format, then run in your browser. Every other format is converted with built-in browser features.

How does XML map to JSON?

Elements become keys, repeated elements become arrays, attributes become @name keys and mixed text becomes #text. Converting back follows the same rules, so a round trip keeps attributes.

How good are the TypeScript and Zod types?

Types are inferred from your sample: fields missing from some array items become optional, mixed values become unions and null is kept. They describe the data you pasted — give a representative sample for the best result.

Why does TOML say it needs an object?

A TOML document is always a table of keys. Arrays or plain values at the top level, and null values, cannot be written as TOML — wrap the array in a key such as {"items": [...]}.

Is my data uploaded anywhere?

No. Parsing and converting happen in JavaScript inside your browser tab. Your text and files are never sent to Toolity or anyone else.