JSON ↔ CSV Converter
Convert JSON arrays of objects to CSV and CSV data back to JSON directly in your browser.
JSON Input
Enter a JSON array containing objects. Each object represents a row.
About JSON ↔ CSV Converter
Convert JSON arrays of objects to CSV and CSV data back to JSON directly in your browser. The converter supports quoted CSV fields, commas, escaped double quotes and line breaks inside quoted values.
How to Use JSON ↔ CSV Converter
- Choose JSON → CSV or CSV → JSON.
- Paste your JSON or CSV data into the input area.
- Click Convert to process the data.
- Review the converted result.
- Click Copy to copy the result to your clipboard.
What Is JSON?
JSON, or JavaScript Object Notation, is a structured text format commonly used to exchange data between web applications, APIs and services. JSON represents data using objects, arrays, strings, numbers, booleans and null values.
What Is CSV?
CSV, or Comma-Separated Values, is a text format commonly used to store tabular data. Each row represents a record, and columns are separated by commas. Double quotes can be used to enclose fields containing commas, quotation marks or line breaks.
JSON vs CSV
| JSON | CSV |
|---|---|
| Structured and hierarchical data | Tabular data in rows and columns |
| Commonly used by APIs | Commonly used by spreadsheets |
| Supports nested objects and arrays | Primarily designed for flat tabular data |
JSON to CSV Example
A JSON array of objects is converted into a table. Object properties become column headers, and each object becomes a row.
JSON Input
[
{ "name": "John", "age": 30 },
{ "name": "Jane", "age": 25 }
]CSV Output
name,age John,30 Jane,25
CSV to JSON Example
The first CSV row supplies the property names. Each following row becomes a JSON object, and CSV field values are returned as strings.
CSV Input
name,age John,30 Jane,25
JSON Output
[
{
"name": "John",
"age": "30"
},
{
"name": "Jane",
"age": "25"
}
]How Are Quoted CSV Values Handled?
CSV fields enclosed in double quotes can contain commas, escaped double quotes and line breaks. For example, "Bangkok, Thailand" is treated as one field rather than two columns. Two consecutive double quotes inside a quoted field represent one literal double quote.
Data Types and Nested JSON Values
CSV does not define separate data types for numbers, booleans, null values or strings. When CSV is converted to JSON, every field value is returned as a string. When JSON is converted to CSV, null values become empty fields, while nested objects and arrays are stored as JSON text inside a CSV field. Converting that CSV back to JSON does not restore nested values as objects or arrays automatically.
When Should You Convert JSON to CSV?
Converting JSON to CSV can be useful when you need to open structured data in spreadsheet applications, analyze tabular records or share data in a simple row-and-column format.
When Should You Convert CSV to JSON?
Converting CSV to JSON can be useful when tabular data needs to be processed by JavaScript applications, APIs or other systems that work with structured JSON data.
Input Limit and CSV Requirements
The input limit is 100,000 characters. CSV input must include a header row with unique, non-empty column names and at least one data row. Rows cannot contain more values than the header row. Missing values are represented as empty strings in the resulting JSON.
Is My Data Uploaded to a Server?
No. JSON parsing and CSV conversion run directly in your browser using JavaScript. Your input does not need to be uploaded to a server for conversion.
A Note About Spreadsheet Formula Values
CSV files may contain values that spreadsheet applications interpret as formulas. Review data from untrusted sources before opening CSV output in spreadsheet software.
