JSON ↔ CSV Converter
Pricing
Pay per event
JSON ↔ CSV Converter
Convert between JSON and CSV in both directions. Auto-detect format, flatten nested JSON with dot notation, custom delimiters (comma, semicolon, tab, pipe), URL input, and bulk multi-file processing.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
an hour ago
Last modified
Categories
Share
Convert between JSON and CSV formats in both directions — no code, no spreadsheets, no manual reformatting. Paste data directly, provide a URL, or process multiple files in one run.
What does JSON ↔ CSV Converter do?
JSON ↔ CSV Converter is an Apify actor that transforms data between the two most common data interchange formats. It works in both directions:
- JSON → CSV: Convert a JSON array (or API response) into a flat CSV spreadsheet. Nested objects are flattened using dot notation (e.g.,
address.city). - CSV → JSON: Parse a CSV file into a structured JSON array, ready for APIs, databases, or downstream automation.
The actor auto-detects which direction to convert — just paste your data and run. For custom workflows, you can explicitly choose the direction, set the delimiter, and process multiple inputs in a single run.
Who is JSON ↔ CSV Converter for?
🧑💻 Developers and data engineers
- Normalize API responses (JSON) into CSV for database imports
- Convert CSV exports from legacy systems into JSON for modern APIs
- Pre-process data before feeding it into ETL pipelines
- Batch-convert multiple datasets in one Apify run via the
inputsarray
📊 Data analysts and BI teams
- Open JSON API responses directly in Excel or Google Sheets (export to CSV)
- Convert spreadsheet exports back to JSON for script processing
- Handle European datasets with semicolon delimiters
- Fetch live JSON from any public URL and get CSV output in seconds
🤖 No-code automation builders
- Use with Zapier or Make to transform data between apps
- Connect JSON-producing scrapers to CSV-consuming tools
- Schedule daily conversions with Apify's built-in scheduler
🔬 Researchers and academics
- Convert scraped JSON datasets to CSV for statistical software (R, SPSS, STATA)
- Transform survey exports between formats
- Flatten deeply nested research data into analyzable tabular form
Why use JSON ↔ CSV Converter?
- ✅ Both directions — JSON→CSV and CSV→JSON in a single actor
- ✅ Auto-detect — paste data, it figures out the format automatically
- ✅ Deep nesting — flatten multi-level JSON objects with dot notation (
user.address.city) - ✅ Custom delimiters — comma, semicolon, tab, or pipe
- ✅ URL input — provide a URL to a JSON or CSV file and get instant conversion
- ✅ Bulk processing — convert multiple datasets in one run using the
inputsarray - ✅ Handles edge cases — quoted fields, embedded newlines, missing values, single objects
- ✅ No setup required — no API keys, no login, no configuration files
- ✅ Free to try — $5 free credits on the Apify platform cover thousands of conversions
What data formats can you convert?
| Feature | Details |
|---|---|
| 📥 JSON input | JSON arrays, single JSON objects, nested objects |
| 📥 CSV input | Standard CSV, semicolon/tab/pipe delimited, with or without headers |
| 📤 CSV output | Configurable delimiter, optional header row |
| 📤 JSON output | Formatted JSON array with dynamic typing |
| 🌐 URL input | Fetch JSON or CSV from any public HTTP/HTTPS URL |
| 🔢 Bulk | Multiple conversion tasks in a single run |
| 📐 Flattening | Recursive dot-notation flattening of nested objects |
| 🗃️ Arrays in JSON | Serialized as JSON strings in CSV (non-lossy) |
How much does it cost to convert JSON to CSV?
This actor uses pay-per-event pricing — you pay only for what you convert. No monthly subscription required.
| Free | Starter ($29/mo) | Scale ($199/mo) | Business ($999/mo) | |
|---|---|---|---|---|
| Per conversion | $0.00115 | $0.001 | $0.00078 | $0.0006 |
| 100 conversions | $0.115 | $0.10 | $0.078 | $0.06 |
| 1,000 conversions | $1.15 | $1.00 | $0.78 | $0.60 |
Plus a one-time $0.01 start fee per run (covers actor initialization).
Real-world cost examples:
| Task | Conversions | Cost (Free tier) |
|---|---|---|
| Convert 1 JSON file to CSV | 1 | ~$0.011 |
| Batch convert 10 files | 10 | ~$0.021 |
| Daily batch of 50 datasets | 50 | ~$0.068 |
💡 On Apify's free plan ($5 credits), you can run 400+ individual conversions before spending a cent.
How to convert JSON to CSV
- Go to the JSON ↔ CSV Converter page on Apify Store.
- Click Try for free to open the actor in Apify Console.
- In the Inputs field, add your conversion task(s) as a JSON array.
- Set Conversion Mode — use
autofor automatic detection, or choosejsonToCsv/csvToJsonexplicitly. - Configure the delimiter and flattening options if needed.
- Click Save & Run.
- Open the Dataset tab to view results. Click Export to download as CSV, JSON, or Excel.
Example: Convert a JSON array to CSV
{"inputs": [{"inputData": "[{\"name\":\"Alice\",\"age\":30,\"city\":\"New York\"},{\"name\":\"Bob\",\"age\":25,\"city\":\"London\"}]","mode": "jsonToCsv"}]}
Output CSV:
name,age,cityAlice,30,New YorkBob,25,London
Example: Convert CSV to JSON with semicolon delimiter
{"inputs": [{"inputData": "name;age;city\nDave;40;Paris\nEve;28;Berlin","mode": "csvToJson","delimiter": ";"}]}
Output JSON:
[{ "name": "Dave", "age": 40, "city": "Paris" },{ "name": "Eve", "age": 28, "city": "Berlin" }]
Example: Fetch JSON from a URL and convert to CSV
{"inputs": [{"inputUrl": "https://api.example.com/users","mode": "jsonToCsv","flattenNestedJson": true}]}
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
inputs | array | — | Array of conversion tasks. Each task can override any parameter below. |
mode | string | "auto" | Conversion direction: "auto", "jsonToCsv", "csvToJson" |
delimiter | string | "," | CSV column separator: ",", ";", "\t" (tab), "|" (pipe) |
flattenNestedJson | boolean | true | Flatten nested objects with dot notation (address.city) |
includeHeader | boolean | true | Include header row in CSV output (or expect headers when parsing CSV) |
Per-task fields (inside each inputs item):
| Parameter | Type | Description |
|---|---|---|
inputData | string | Raw JSON or CSV text to convert |
inputUrl | string | URL to fetch data from (alternative to inputData) |
mode | string | Override the global mode for this task |
delimiter | string | Override the global delimiter for this task |
flattenNestedJson | boolean | Override flattening for this task |
includeHeader | boolean | Override header setting for this task |
Output examples
Each conversion task produces one dataset item:
JSON → CSV result:
{"inputIndex": 1,"mode": "jsonToCsv","outputFormat": "csv","output": "name,age,city\nAlice,30,New York\nBob,25,London","rowCount": 2,"columnCount": 3,"inputPreview": "[{\"name\":\"Alice\",\"age\":30..."}
CSV → JSON result:
{"inputIndex": 2,"mode": "csvToJson","outputFormat": "json","output": "[\n {\"name\":\"Dave\",\"age\":40,\"city\":\"Paris\"},\n {\"name\":\"Eve\",\"age\":28,\"city\":\"Berlin\"}\n]","rowCount": 2,"columnCount": 3,"inputPreview": "name,age,city\nDave,40,Paris"}
Output fields:
| Field | Type | Description |
|---|---|---|
inputIndex | number | Task number (1-based) |
mode | string | Conversion performed (jsonToCsv or csvToJson) |
outputFormat | string | Output format (csv or json) |
output | string | Converted data as a string |
rowCount | number | Number of rows/items in the output |
columnCount | number | Number of columns/fields |
inputPreview | string | First 100 characters of the input |
error | string | Error message if conversion failed (task is skipped gracefully) |
Tips for best results
- Start with
mode: "auto"— the actor correctly identifies JSON vs CSV in virtually all cases. Only specify a direction if you have a reason to. - Flatten nested data — leave
flattenNestedJson: true(default) for clean CSV output. Disable only if you need JSON-encoded values in cells. - Match delimiter to your source — European datasets often use
;(semicolon). Tab-delimited (\t) is common for files exported from Excel. - Process multiple files at once — use the
inputsarray to convert 10, 50, or 100 files in a single run. Each task can have its own delimiter and mode. - Fetch live data — use
inputUrlto pull from any public API or CDN-hosted file. Great for scheduled runs that convert daily data exports. - Check the
errorfield — failed tasks don't stop the run. Checkerrorin the dataset to see what went wrong with individual items. - Download via API — use the dataset API to fetch
outputfields directly and pipe into your pipeline.
Integrations
JSON ↔ CSV Converter works seamlessly with Apify's 5,000+ integrations.
🗂️ JSON ↔ CSV Converter → Google Sheets Convert a scraped JSON dataset into CSV and import directly into Google Sheets using Make (formerly Integromat). Schedule daily runs to keep your sheet up to date with fresh data.
📦 Apify Scraper → JSON ↔ CSV Converter → Database Chain an Apify scraper (e.g., Google Maps Lead Finder) with this converter. The scraper outputs JSON; this actor flattens and converts to CSV for direct import into Postgres, MySQL, or BigQuery.
🔔 Batch conversion with Webhooks
Trigger the converter automatically via webhook after an upstream actor finishes. The webhook passes the dataset URL as inputUrl, and the converter outputs a ready-to-use CSV.
📅 Scheduled daily export
Use Apify's built-in scheduler to run daily at 6 AM. Combine with an inputUrl pointing to a live API endpoint (e.g., your internal reporting API) to auto-convert fresh data every morning.
🔗 Zapier / Make automation Connect Apify via Zapier or Make to trigger conversions from Google Sheets, Notion, or Airtable row events. The converted output lands back in your tool of choice via the next automation step.
Using the Apify API
Run JSON ↔ CSV Converter programmatically using the Apify API.
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('automation-lab/json-csv-converter').call({inputs: [{inputData: '[{"name":"Alice","age":30},{"name":"Bob","age":25}]',mode: 'jsonToCsv',}],});const dataset = await client.dataset(run.defaultDatasetId).listItems();console.log(dataset.items[0].output);
Python
from apify_client import ApifyClientclient = ApifyClient(token='YOUR_APIFY_TOKEN')run = client.actor('automation-lab/json-csv-converter').call(run_input={'inputs': [{'inputData': '[{"name":"Alice","age":30},{"name":"Bob","age":25}]','mode': 'jsonToCsv',}],})for item in client.dataset(run['defaultDatasetId']).iterate_items():print(item['output'])
cURL
curl -X POST \"https://api.apify.com/v2/acts/automation-lab~json-csv-converter/runs?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"inputs": [{"inputData": "[{\"name\":\"Alice\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]","mode": "jsonToCsv"}]}'
Use with AI agents via MCP
JSON ↔ CSV Converter is available as a tool for AI assistants that support the Model Context Protocol (MCP).
Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com"
Setup for Claude Desktop, Cursor, or VS Code
Add this to your MCP config file:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
Your AI assistant will use OAuth to authenticate with your Apify account on first use.
Example prompts
Once connected, try asking your AI assistant:
- "Use automation-lab/json-csv-converter to convert this JSON array to a CSV: [{"name":"Alice","age":30},{"name":"Bob","age":25}]"
- "Fetch the JSON from https://jsonplaceholder.typicode.com/users and convert it to CSV using automation-lab/json-csv-converter, with nested objects flattened"
- "Convert my tab-delimited CSV data to JSON — use automation-lab/json-csv-converter with delimiter set to tab"
Learn more in the Apify MCP documentation.
Is it legal to use JSON ↔ CSV Converter?
Yes. This actor processes data you provide directly (pasted text or URLs you specify). It does not scrape any website or access data without your explicit instruction. You are responsible for ensuring you have the right to process and transform the data you input.
When using inputUrl, only fetch data from URLs you own or have permission to access. Do not use this actor to download and convert copyrighted datasets without authorization.
FAQ
How fast is the conversion? Extremely fast. JSON ↔ CSV Converter is a pure data processing actor — no browser, no proxy, no web crawling. A typical single conversion completes in 2-5 seconds. Batch conversions of 50+ items finish in under 30 seconds.
How much does one conversion cost? On the free plan: $0.01 (start fee) + $0.00115 per conversion. Converting one file costs roughly $0.011. On paid plans it's cheaper per conversion.
What is the difference between this and building a script myself? Zero setup. No npm packages to install, no TypeScript to compile, no environment to configure. Run it from anywhere — browser, API, Zapier, or Make — with no local dependencies.
What happens to nested objects like address: { city: "NYC" }?
With flattenNestedJson: true (default), they become flat columns: address.city = NYC. Arrays inside objects become JSON-encoded strings in the CSV cell (e.g., ["tag1","tag2"]).
Why are some rows missing from my CSV output?
The most common cause is using the wrong mode. If your CSV uses semicolons but delimiter is set to comma (default), PapaParse may treat the whole row as one column. Set delimiter: ";" to fix this.
Why is the output empty for my JSON input?
Check that your JSON is a valid array ([...]) or object ({...}). Strings, numbers, and null values at the top level are not supported. Use a tool like jsonlint.com to validate your JSON before running.
Can I convert more than one file at once?
Yes — use the inputs array and add as many conversion tasks as you need. Each task can have its own inputData, inputUrl, mode, and delimiter.
Does it support very large files? For files above ~50 MB, consider splitting them into chunks. The actor processes everything in memory, so very large inputs may hit the 256 MB memory limit. Contact support to discuss large-scale processing needs.
Other developer tools
Explore more utility actors from the same account:
- Broken Link Checker — Scan any website for broken links and 404 errors
- Canonical URL Checker — Verify canonical tags across multiple pages at once
- DMARC Record Checker — Validate DMARC, SPF, and DKIM email authentication records
- Accessibility Checker — Audit web pages for WCAG accessibility compliance issues
- Website Uptime Checker — Monitor URL availability and response times
- Robots & Sitemap Analyzer — Parse and validate robots.txt and XML sitemaps
- Cookie Scanner — Detect and categorize cookies on any web page