JSON to CSV

Convert an array of objects into CSV with a generated header and proper escaping of commas, quotes and newlines; nested objects are serialized as JSON.

Drop a file here
or click the button below to choose a local file
.json / .txt / .csv, up to 10 MB, parsed locally in your browser
Array source
Fields
Nested objects
Array fields
Preview
The CSV preview appears here after conversion
Everything runs locally in your browser. No data is uploaded.

Extract JSON data and convert it into a CSV table

What is JSON to CSV?

JSON to CSV converts structured JSON data into a CSV file suitable for viewing and processing as a table. This tool is useful for organizing API responses, exported configuration data, or JSON arrays into tables, with options for selecting the data source, fields, and handling of nested data before conversion.

What JSON structures can be converted to CSV?

The most common input is a JSON array containing multiple objects, such as [{\"name\":\"Tom\",\"age\":18},{\"name\":\"Jack\",\"age\":20}]. Each object becomes one row, and its fields become CSV columns.

If the outer JSON structure is an object, you can select top-level data according to the structure or use JSONPath to specify the array to convert, such as $.data.list. This makes it easy to extract a list from common API structures such as {\"data\":{\"list\":[...]}}.

Three ways to select the data source

Automatic detection chooses a suitable data source based on the structure of the input JSON. Top-level data converts the top-level JSON object or array directly. JSONPath lets you manually specify the location to convert, such as $.data.list. When a JSON document contains many fields but only one nested array needs to be exported, JSONPath provides a direct way to select it.

How are JSON fields handled?

Fields can use automatic mode or complete-field mode. Automatic mode generates suitable CSV columns from the actual data. Complete-field mode preserves the fields found within the conversion scope. When different objects do not have exactly the same fields, the field handling mode affects the final CSV headers and empty cells.

How are nested objects converted to CSV?

Nested JSON objects cannot be used directly as ordinary table columns, so the tool provides two options. When kept as JSON, a nested object is written to a cell as a JSON value. When expanded into columns, nested fields become separate columns, which is more convenient for further processing in spreadsheets or data analysis tools.

For example, the user object in {\"user\":{\"name\":\"Tom\",\"age\":18}} can remain as one JSON cell or be expanded into fields such as user.name and user.age.

How are arrays converted to CSV?

Arrays can be kept as JSON strings in a cell or expanded into rows. Keeping them as JSON preserves the original structure, while row expansion is useful when the array represents a group of records that should be processed individually. The appropriate option depends on whether you need to preserve the JSON structure or view array elements as separate table rows.

How to convert a local JSON file to CSV

Switch to the file upload tab and drag a .json file onto the page, or select a local file. The file is read locally in the browser, with a 10 MB limit per file. After loading, you can choose the data source, fields, and nested object and array handling options before converting.

What can you do with the converted CSV?

After conversion, the page displays a CSV preview and the complete text result. You can copy the result or download it as a CSV file. The generated CSV can be opened and processed with Excel, spreadsheet applications, database import tools, or other data-processing programs.

Common JSON to CSV issues

If the conversion result is empty, first confirm that the JSON is valid and that the selected data source points to an array containing records. If the JSON data is inside a nested object, try a JSONPath such as $.data.list. If the generated columns are not what you expect, check the nested object and array handling options and whether the input objects use consistent fields.

How this tool processes data

JSON parsing, field organization, nested data handling, and CSV generation all take place locally in the browser. Input data is not uploaded to the server. This makes the tool suitable for API data, configuration files, and local JSON files that should not be sent to third-party services.

How do you convert JSON to CSV?

JSON to CSV organizes JSON objects or arrays into a table: normally each object becomes one row and object fields become CSV columns.

If the data is nested under fields such as data.list, use JSONPath to specify the data source. Nested objects and arrays can also be kept as JSON or expanded.

  • Converts JSON objects or arrays to CSV and provides a preview of the result
  • Data sources support automatic detection, top-level data, and JSONPath paths
  • Supports automatic field handling or preserving all fields within the conversion scope
  • Nested objects can be kept as JSON or expanded into separate CSV columns
  • Arrays can be kept as JSON or expanded into rows for different table requirements
  • Everything runs locally in the browser, and input data is not uploaded to the server
To extract data from JSON by conditions, use JSONPath Query first. To compare field changes between two JSON documents, use JSON Diff. To merge multiple JSON objects, use JSON Merge. To check JSON structure against rules, use JSON Schema Validator.
Comments 0
No comments yet. Be the first to comment!
avatar
Comment content cannot be empty
0/255