CSV ⇔ JSON Converter
Convert between CSV and JSON formats
1. What is CSV and JSON?
CSV (Comma-Separated Values) is a simple tabular data format where each line represents a row and values are separated by delimiters. JSON (JavaScript Object Notation) represents data as arrays of objects with named properties, providing more structure and supporting nested data.
2. How does it work?
CSV to JSON parses each line into an array, using the first row as property names (if headers enabled). Each subsequent row becomes a JSON object with those properties. JSON to CSV extracts all unique keys as headers, then maps each object's values to CSV rows, handling quotes for values containing delimiters or newlines.
Use Cases
CSV is commonly used for spreadsheet exports, data imports, and bulk data transfers. JSON is preferred for web APIs, configuration files, and modern data interchange. This tool helps convert between the two formats for different use cases.
Delimiter Options
Choose the delimiter that matches your CSV file: comma (,) for standard CSV, semicolon (;) for European formats, or tab for TSV files. The first row can be treated as headers or as data.
3. Examples
Simple CSV
name,age
John,30
Jane,25 ⇔ [{"name":"John","age":"30"},{"name":"Jane","age":"25"}]