CSV ↔ JSON Converter

Convert between CSV and JSON formats with auto-detected delimiters. 100% client-side.

Last reviewed: April 2026

New to this tool? Click here for instructions

Input
Output
Paste CSV or JSON above to convert.

How to Use the CSV ↔ JSON Converter

  1. Choose your conversion direction - CSV to JSON (default) or JSON to CSV.
  2. Paste your data into the input area on the left (or top on mobile).
  3. Select a delimiter - Auto-detect (default), Comma, Tab, Semicolon, or Pipe.
  4. View the result - converted data appears instantly on the right.
  5. Copy or download - use the buttons above the output to copy or download the result.

What This Tool Does

This converter transforms data between CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) formats. For CSV to JSON, it reads the first row as headers and converts each subsequent row into a JSON object. For JSON to CSV, it takes an array of objects, extracts all unique keys as headers, and generates properly quoted CSV output.

Features

  • Bidirectional conversion - CSV to JSON and JSON to CSV in one tool
  • Auto-detect delimiter - automatically identifies commas, tabs, semicolons, or pipes
  • RFC 4180 compliant - handles quoted fields, escaped quotes, and embedded delimiters
  • Pretty-printed JSON - output JSON is formatted with 2-space indentation
  • Proper CSV quoting - fields containing delimiters, quotes, or newlines are properly escaped
  • Privacy - all processing happens in your browser, no data is ever uploaded

CSV Format Rules (RFC 4180)

The CSV format, standardized in RFC 4180, has specific rules: fields are separated by the delimiter (usually a comma), records are separated by newlines, and fields containing the delimiter, double quotes, or newlines must be enclosed in double quotes. Within a quoted field, a double quote is escaped by doubling it (""). This tool handles all of these cases correctly.

Delimiter Detection

When auto-detect is enabled, the tool analyzes the first line of your CSV data and counts the frequency of each potential delimiter character (comma, tab, semicolon, pipe). The character that appears most frequently and consistently is chosen as the delimiter. This works well for most real-world data files, but you can always override the detection by manually selecting a delimiter.

JSON to CSV: Handling Nested Objects

When converting JSON to CSV, flat objects (where all values are strings, numbers, or booleans) map directly to CSV columns. Nested objects and arrays are converted to their JSON string representation in the CSV cell. For deeply nested data, consider flattening your JSON first using a tool like the JSON Formatter, then converting to CSV.

Common Use Cases

Developers and data analysts frequently need to convert between CSV and JSON when importing data into databases, processing API responses, creating data visualizations, migrating between systems, or preparing data for spreadsheets. This tool handles all of these workflows without requiring any software installation or data uploads. Once converted, format your JSON output with our JSON Formatter, or convert between other formats using the YAML Converter and SQL Formatter.

RFC 4180 Compliance

This converter follows the RFC 4180 standard for CSV parsing. Fields containing commas, double quotes, or newlines are enclosed in double quotes. Double quotes within quoted fields are escaped by doubling them. The first row is treated as a header row when converting to JSON, producing an array of objects with named keys rather than a flat array of arrays.

How to Use the CSV ↔ JSON Converter

To use the CSV ↔ JSON Converter, follow these steps:

1. Choose your conversion direction: Select either CSV to JSON or JSON to CSV.

2. Paste your data: Enter your CSV or JSON data into the input area.

3. Select a delimiter: Choose the delimiter used in your CSV data (Auto-detect, Comma, Tab, Semicolon, or Pipe).

4. View the result: The converted data will appear instantly on the right.

5. Copy or download: Use the buttons above the output to copy or download the result.

What This Tool Does

This converter transforms data between CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) formats. For CSV to JSON, it reads the first row as headers and converts each subsequent row into a JSON object. For JSON to CSV, it takes an array of objects, extracts all unique keys as headers, and generates properly quoted CSV output.

When to Use the Tool in Real Workflows

This tool is ideal for developers and data analysts who need to convert between CSV and JSON formats for various workflows, such as importing data into databases, processing API responses, creating data visualizations, migrating between systems, or preparing data for spreadsheets.

How It Works

The tool uses a client-side approach, meaning all processing happens in your browser, and no data is ever uploaded. It supports auto-detection of delimiters and handles quoted fields according to the RFC 4180 standard. The converter can handle both CSV to JSON and JSON to CSV conversions.

Tips, Edge Cases, or Limitations

1. Delimiter Detection: The tool auto-detects delimiters based on the first line of your CSV data. If auto-detection fails, you can manually select a delimiter.

2. Nested Objects: When converting JSON to CSV, nested objects and arrays are converted to their JSON string representation. For deeply nested data, consider flattening your JSON first.

3. RFC 4180 Compliance: The converter follows the RFC 4180 standard for CSV parsing, ensuring that fields containing commas, double quotes, or newlines are properly enclosed in double quotes.

Frequently Asked Questions

The tool reads the first row of your CSV data as headers and converts each subsequent row into a JSON object.
The tool supports comma, tab, semicolon, and pipe delimiters. It also has an auto-detect option.
No, all processing happens in your browser. Your data is never sent to a server.
The tool handles quoted fields according to the RFC 4180 standard, ensuring that double quotes within quoted fields are escaped by doubling them.
The tool expects an array of objects for JSON to CSV conversion. Each object represents a row in the CSV output.

Quick reference

CSV & JSON Conversion Guide
Feature CSV JSON Notes
Delimiter Commas (,) Colons (:) and braces ({}) CSV requires quotes for special characters
Data Types Plain text only Supports nested objects/arrays JSON preserves numeric/boolean types
Nested Data Flat structure only Supports hierarchical data CSV requires multiple rows for nesting
File Size Generally larger More compact for complex data JSON reduces redundancy in repeated fields
Editing Easy for simple datasets Requires careful syntax validation CSV editors lack schema enforcement
Common Tools Excel, Google Sheets jq, Python (json module), online converters JSON tools often support streaming large files