ToolsCourt
JSON ↔ CSV
⚙️ Free Dev Tool

JSON ↔ CSV Converter

Convert JSON to CSV and CSV to JSON. Handles nested objects with dot-notation flattening. Table preview before download.

Direction
Delimiter
JSON Input

JSON vs CSV — When to Use Each

FactorJSONCSV
StructureHierarchical (nested objects)Flat (rows and columns)
Human readableSomewhatVery
Excel/Sheets compatibleNo (without tools)Yes, natively
API responsesYes — standard formatRarely
Database exportYesYes
Nested dataYesNo (flattened or lost)
File size~30% larger than CSVCompact
Best forAPIs, configs, complex dataSpreadsheets, analysis, reports

Nested JSON Flattening — How It Works

JSON APIs frequently return nested objects. A user record might look like: {"user": {"name": "Rahul", "address": {"city": "Mumbai", "pin": "400001"}}}. Converting this to CSV requires flattening the nesting into column names: user.name, user.address.city, user.address.pin. Our converter uses recursive dot-notation flattening — any depth of nesting is handled automatically.

Input JSON:
{"name": "Rahul", "scores": {"math": 95, "science": 88}}

Output CSV columns:
name, scores.math, scores.science

Output CSV row:
"Rahul", 95, 88
What happens to JSON arrays inside objects?
Arrays are JSON-stringified into a single cell. For example, {"tags": ["python", "dev"]} becomes a column with value '["python","dev"]'. For deeply nested arrays of objects, pre-flatten the data before conversion or use a data transformation tool.
Can I convert CSV back to the original nested JSON?
The CSV-to-JSON conversion creates flat objects (one level) from CSV rows. If your original JSON had nested structure that was flattened during JSON-to-CSV conversion, the reverse conversion will not restore the nesting — you get flat objects. Nesting reconstruction requires knowing the original schema.