JSON to CSV Converter

Convert JSON arrays to CSV and CSV to JSON instantly. Multiple delimiter options. Free, client-side, no signup.

Your data never leaves your browser Available via MCP

How to Use

  1. Select the conversion direction: JSON to CSV or CSV to JSON.
  2. Choose your delimiter (comma, tab, semicolon, or pipe).
  3. Paste your data in the input panel.
  4. Click Convert to transform the data.
  5. Click Copy to copy the result, or Swap to reverse the conversion.

JSON to CSV Conversion

When converting JSON to CSV, the tool extracts all unique keys from the array of objects to create column headers. Each object becomes a row, with values placed under their corresponding headers. If an object is missing a key that appears in other objects, an empty value is used. Nested objects and arrays are serialized as JSON strings in the CSV cell.

CSV to JSON Conversion

The reverse conversion treats the first row as column headers (object keys) and each subsequent row as a JSON object. The tool handles quoted fields, escaped double quotes, and embedded delimiters following the RFC 4180 standard. Empty lines are skipped.

When to Use JSON vs. CSV

  • CSV — Best for tabular, flat data. Supported by spreadsheets (Excel, Google Sheets), databases (MySQL LOAD DATA, PostgreSQL COPY), and data analysis tools (pandas, R)
  • JSON — Best for hierarchical, nested data. Native format for web APIs, NoSQL databases, and JavaScript applications
  • Converting API responses to CSV is common when you need to analyze JSON data in a spreadsheet or import it into a relational database

Working with CSV in Code

In Python, the csv module and pandas.read_csv() handle CSV parsing. In JavaScript, libraries like PapaParse provide robust parsing with Web Worker support for large files. In the command line, tools like csvkit, jq, and miller convert between JSON and CSV formats.

Related Tools

Validate JSON before converting with the JSON Validator. Format JSON with the JSON Formatter. Convert to YAML with the JSON-YAML Converter. Format XML data with the XML Formatter. Compare CSV versions with the Diff Checker. View and sort CSV data in the CSV Viewer. Encode CSV content for URLs with the URL Encoder.

Frequently Asked Questions

What JSON format is expected?
The tool expects a JSON array of objects, where each object represents a row and object keys become column headers. Example: [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]. Nested objects are serialized as JSON strings in the CSV output.
Can I convert CSV back to JSON?
Yes. Switch to "CSV to JSON" mode, paste your CSV with a header row, and click Convert. The first row is used as object keys, and each subsequent row becomes a JSON object.
What delimiters are supported?
The tool supports comma (,), tab, semicolon (;), and pipe (|) delimiters. European CSV files often use semicolons since commas are used as decimal separators in many European locales.
How are special characters handled?
Values containing the delimiter, double quotes, or newlines are automatically wrapped in double quotes. Double quotes within values are escaped by doubling them (""), following the RFC 4180 CSV standard.
Is my data safe?
Yes. All conversion happens entirely in your browser. No data is sent to any server.

Code Examples

Learn how to use this tool programmatically in your favorite language.

Use this tool from AI agents. The CodeTidy MCP Server lets Claude, Cursor, and other AI agents use this tool and 46 others directly. One command: npx @codetidy/mcp

Drop file to load