JSON to CSV Converter avatar

JSON to CSV Converter

Pricing

$1.75 / 1,000 converted rows

Go to Apify Store
JSON to CSV Converter

JSON to CSV Converter

Turn a JSON object or collection into a CSV or TSV file. Use direct JSON, a URL, or an Apify dataset, then flatten nested fields, choose columns, and get the complete file with structured rows.

Pricing

$1.75 / 1,000 converted rows

Rating

0.0

(0)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

🧾 Move JSON into a CSV or TSV file

JSON to CSV Converter helps developers, analysts, and automation builders turn one JSON object or a collection of records into a complete CSV or TSV file. It returns a file link, a conversion summary, and structured dataset rows, so you can move JSON into Excel or another data workflow.

Use cases

📊 Converted files, summaries, and rows

After a run, the Actor returns a complete CSV or TSV file link, file format, conversion status, row and column counts, and column names. It also saves structured dataset rows with rowNumber and a values object keyed by the output columns.

▶️ Run one JSON conversion

Each run handles one conversion request.

  1. Choose Direct JSON, JSON URL, or Platform dataset in Target.
  2. Paste one JSON object or an array of JSON objects, enter a URL that returns one object or array, or choose the Apify dataset to convert.
  3. Choose how to handle nested objects and arrays, select fields, and set the output format and delimiter.
  4. Run the Actor, then use the file link or dataset link in the output.

Leave maxRecords empty to return all available results until the source is exhausted.

⚙️ Input

Choose one source. Fields in other Target sections are ignored.

Input fields

FieldTypeWhat it does
targetstringSelects the source: direct, url, or dataset.
jsonInputobject or arraySupplies one JSON object or an array of JSON objects for direct.
jsonUrlstringSupplies one HTTP or HTTPS URL that returns one JSON object or an array of JSON objects for url.
datasetIdstringSelects the Apify dataset that contains JSON records for dataset.
nestedValueModestringChooses flatten for path-based columns or preserve for JSON in one cell.
keySeparatorstringSets the text between parts of flattened keys. It is used when nested objects are flattened.
arrayValueModestringChooses rows to create rows from array items or cells to keep array items in one cell.
includeFieldsarray of stringsLists field names to export. An empty list includes all fields.
excludeFieldsarray of stringsLists field names to leave out after includeFields is applied.
maxRecordsintegerSets an optional source-record cap. Leave empty to return all available results until the source is exhausted.
outputFormatstringChooses csv or tsv for the output file.
columnDelimiterstringSets the text between columns. A comma is typical for CSV and a tab for TSV.
includeHeadersbooleanAdds the column names as the first row when true.
nullValuestringSets the text used for null or missing values.

Example input

This is the public input from a successful current-beta default run:

{
"target": "direct",
"jsonInput": [
{
"sku": "NB-001",
"name": "A5 notebook",
"price": 12.5,
"inStock": true
},
{
"sku": "PN-002",
"name": "Blue pen set",
"price": 6.75,
"inStock": true
}
],
"nestedValueMode": "flatten",
"keySeparator": ".",
"arrayValueMode": "cells",
"outputFormat": "csv",
"columnDelimiter": ",",
"includeHeaders": true,
"nullValue": ""
}

🧾 Output

The run output has a conversion summary. The default dataset has one structured row for each converted output row.

Run summary

FieldTypeWhat it does
statusstringShows whether the conversion finished.
fileUrlstringLinks to the complete CSV or TSV file in Apify storage.
fileFormatstringShows whether the file is CSV or TSV.
datasetUrlstringLinks to the converted rows in the default dataset.
rowCountstringGives the number of converted output rows.
columnCountstringGives the number of columns in the converted file.
columnsstringGives the output column names in file order.

Dataset rows

FieldTypeWhat it does
rowNumberintegerGives the position of this converted row in the output.
valuesobjectHolds the values for this row. Its keys are the output column names.
values.<column>JSON valueHolds the value for one output column. Column names and value types come from the converted source data.

Example dataset row

This complete row comes from a successful current-beta run that used :: as the key separator and expanded array items into rows:

{
"rowNumber": 1,
"values": {
"orderId": "ORD-100",
"customer::name": "Ada",
"items::sku": "NB-001",
"items::qty": "2"
}
}

💳 Pricing

This Actor uses Pay-Per-Event pricing. The charge is $0.00175 for each JSON record successfully converted into a CSV or TSV row. The total depends on the number of successfully converted rows.

🔌 Integrations

Use fileUrl to retrieve the complete file and datasetUrl to read converted rows through Apify's API or Console. CSV and TSV files can then be opened in spreadsheet tools or used in another data workflow.

❓ FAQ

Can I convert one JSON object as well as an array?

Yes. jsonInput accepts one object or an array of objects. A JSON URL can return either shape as well.

Can an array create more than one output row?

Yes. Set arrayValueMode to rows when array items should create rows. Use cells when they should stay together in one cell.

How are nested objects written to the file?

With nestedValueMode set to flatten, nested fields become path-based columns such as customer.name. With preserve, a nested value stays as JSON in one cell. keySeparator changes the text between path parts.

What happens when records have different fields?

The output uses one consistent column set. A missing or null value uses the text set in nullValue.

Can I limit how many source records are converted?

Yes. Set maxRecords to an integer source-record cap. Leave it empty to return all available results until the source is exhausted.

Can I use this as a JSON to Excel converter?

The Actor creates CSV or TSV, not an .xlsx workbook. You can open or import the resulting file in Excel.

Can I convert CSV back to JSON?

No. This Actor converts JSON into CSV or TSV. CSV-to-JSON conversion is outside its scope.

Can I use a JSON URL or an Apify dataset as the source?

Yes. Select url or dataset in target, then provide the URL or choose the dataset. For direct conversion, select direct and paste the JSON instead.

📝 Changelog

0.0: Initial release

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

Made with ❤️ by Maxime Dupré