JSON Converter
Convert data between JSON, CSV, YAML, TOML, XML, query strings, and Markdown tables, or generate TypeScript interfaces and Zod schemas.
Settings
2-space indent · comma · flatten
How to Use JSON Converter in 3 Steps
Paste or open data
Drop a JSON, CSV, YAML, TOML, or XML file, or paste raw text. Override auto-detection under From if needed.
Select target format
Choose JSON, CSV, YAML, TOML, XML, query string, Markdown table, TypeScript types, or a Zod schema. Click swap to reverse.
Copy or download output
Copy the converted code or download a file with the matching extension. Adjust indentation, delimiters, and key flattening in Settings.
JSON Converter: Frequently Asked Questions
How does the tool convert nested JSON objects into CSV?
When Flatten is enabled, nested keys become dot-separated columns such as a.b, and row arrays serialize as JSON strings. Disable Flatten to keep nested objects inside single cells.
Which parsers handle YAML and TOML?
The tool loads js-yaml for YAML and smol-toml for TOML on demand. Every conversion executes locally inside your browser tab.
How does XML map to JSON?
XML elements become keys, repeated elements become arrays, attributes use @name keys, and mixed text uses #text. Reverse conversion preserves your attributes.
How accurate are generated TypeScript and Zod schemas?
The generator infers types directly from your sample data. Missing array fields become optional, mixed types form unions, and null values stay explicit.
Why does TOML require a top-level object?
Every TOML file represents a key-value table and omits null types. Wrap top-level arrays inside an object key such as {"items": [...]} before converting.
Is my data uploaded anywhere?
No. All parsing and conversion run locally in JavaScript inside your browser tab. Your text and files never leave your device.
Explore All Data Tools
Parse, convert, and clean structured data files in your browser.