CSV ↔ JSON Converter

Convert CSV to JSON or JSON to CSV instantly. Handles quoted fields, custom delimiters, and nested headers.

Two-way conversionCustom delimiterNo data stored
Quick load:

What is a CSV ↔ JSON Converter?

A CSV ↔ JSON converter transforms data between two ubiquitous formats. CSV (Comma-Separated Values) is a plain-text tabular format widely used for spreadsheets, database exports, and data pipelines. JSON (JavaScript Object Notation) is the standard format for web APIs and application data. Being able to convert between them is essential for moving data between spreadsheet tools, databases, REST APIs, and data processing scripts without writing custom parsing code.

Common Use Cases

  • Convert a database export (CSV) into JSON to load into a REST API or NoSQL database
  • Transform an API response (JSON array) into CSV for import into Excel or Google Sheets
  • Prepare test fixtures from spreadsheet data for a backend application
  • Convert analytics data exports between reporting tools
  • Feed data from CSV files into a JavaScript application without a server-side parser

How It Works

CSV to JSON: the first row is treated as the header and used as JSON object keys. Each subsequent row is zipped with the headers to produce an object; all rows become an array. Quoted fields, commas within quotes, and escaped quotes are handled per RFC 4180. JSON to CSV: the keys of the first object define the header row; each array element is serialised as a CSV row in the same key order. All processing runs locally in your browser.

Frequently Asked Questions

What happens with nested JSON objects?

CSV is a flat format — it cannot represent nested structures directly. Nested objects are typically serialised as a JSON string in a single CSV cell, or flattened into dot-notation column names (e.g. address.city). This tool serialises nested values as strings.

My CSV uses semicolons, not commas — will it work?

Semicolon-separated files are common in European locales where commas are used as decimal separators. Select the correct delimiter in the options to handle semicolon, tab (TSV), or pipe-separated files.

Are all values treated as strings?

By default, yes — CSV has no type information. The converter can optionally infer types (treating 123 as a number and true/false as booleans) when converting to JSON.

RFC 4180 compliant: The CSV parser correctly handles quoted fields, embedded commas, escaped double-quotes (""), and all common line endings. The Swap button moves the current output into the input and flips direction.

All conversion happens locally in your browser. No data is sent anywhere.