CoderTools

JSON CSV Converter

Convert between JSON and CSV formats with nested object flattening and custom delimiter support

About JSON-CSV Converter

JSON (JavaScript Object Notation) and CSV (Comma-Separated Values) are two common data formats used for data exchange and storage.

This converter allows you to easily convert between JSON and CSV formats. It handles nested objects, arrays, and various data types, making data transformation quick and easy.

Key Features

Bidirectional conversion: JSON to CSV and CSV to JSON
Support for nested objects with flattening option
Custom delimiter support (comma, semicolon, tab, pipe)
Optional header row inclusion
Table preview for CSV data
Download converted files directly

Supported JSON Formats

Array of objects: [{...}, {...}]
Single object: {...} (converted as single row)
Nested objects (flattened with dot notation)
Arrays as values (converted to JSON strings)

Common Use Cases

Export API response data to spreadsheet
Import CSV data into web applications
Data migration between systems
Generate reports from JSON data

Best Practices

Flatten Nested Objects Appropriately

Enable 'Flatten Nested Objects' to convert nested JSON to flat CSV columns using dot notation (e.g., 'address.city'). Disable for simple structures to keep output cleaner.

Validate JSON Before Converting

Use a JSON validator first to ensure your JSON is well-formed. Invalid JSON will cause conversion errors that may be hard to diagnose.

Handle Arrays in Values

Arrays as values become JSON strings in CSV. If you need individual rows per array item, preprocess your JSON to flatten arrays first.

Check Column Order

CSV columns follow the order of keys in the first JSON object. Ensure your first object has all expected keys to get consistent column headers.

Use Appropriate Delimiters

If your data contains commas, use semicolon or tab delimiter. For European locales where comma is decimal separator, semicolon is preferred.

Preview Before Download

Always check the table preview to verify the conversion result matches your expectations before downloading or copying the output.

Troubleshooting

Why are some columns missing?

CSV uses the first object's keys as headers. If later objects have additional keys, those columns won't appear. Ensure all objects have consistent keys.

Why do I see [object Object] in my CSV?

Nested objects that aren't flattened become string representations. Enable 'Flatten Nested Objects' or preprocess your JSON to remove nesting.

Why is CSV to JSON producing an empty array?

Check that your CSV has content and the correct delimiter is selected. Empty rows or mismatched delimiters cause parsing to fail silently.

How do I handle CSV with different data types?

CSV to JSON conversion treats all values as strings by default. For numbers, booleans, or null values, you may need to post-process the JSON output.

Quick Menu

No recent tools