CSV to JSON Converter: nested, typed, any shape
Pricing
from $1.40 / 1,000 converted files
CSV to JSON Converter: nested, typed, any shape
Convert CSV files to JSON: detects encoding (Shift_JIS, UTF-8, Windows-1252) and delimiter, types numbers/booleans/null, nests dotted headers, writes arrays, NDJSON or keyed objects. Empty input = free demo.
Pricing
from $1.40 / 1,000 converted files
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
CSV to JSON converter: typed values, nested objects from dotted headers, and the JSON shape you need. Encoding and delimiter are detected for you.
- Cost: $0.002 per converted file, whatever its row count (up to 100,000 rows). The $5 monthly free credit covers about 2,500 files. Failed files and the demo are free.
- Output: one
.json(or.ndjson) file per CSV with a download link, plus one result row per file.
For anyone who has a CSV and needs JSON that code can use straight away. Most converters give you every value as text and leave you to fix the numbers, the empty cells and the garbled Japanese, Chinese or accented characters. This Actor reads the file the way a person would: it finds the encoding and the delimiter itself, turns 12800 into a number, true into a boolean and an empty cell into null, and keeps dates and ID codes as text. You get a file you can load into a script, an API, a database or a JavaScript app without a cleaning step.
Try it free: leave every input empty and press Start (clear the prefilled URL first). A built-in Shift_JIS sample is converted, nothing is charged, and the result row carries _demo: true.
The problems it solves
- A CSV from a Japanese, Chinese or European system shows broken characters when you convert it. The encoding is detected (UTF-8, UTF-8 with BOM, Shift_JIS, EUC-JP, GBK, Big5, EUC-KR, Windows-1252, Windows-1251 and more) and the JSON is always clean UTF-8. The result row says what was found and how sure it is.
- Semicolon, tab or pipe separated exports. The delimiter is detected, or you choose it.
- Everything arrives as text. Numbers,
true/falseand empty cells get real JSON types, column by column, so one strayN/Anever turns half a column into numbers. - Flat headers, nested data needed. Turn on Nest dotted headers and
address.citybecomes{"address": {"city": ...}}. - You need a lookup table or a loader format, not a list. Choose the output shape: array of objects, NDJSON (one object per line), an object keyed by a column you pick, or one array per column.
- European number formats. Choose the decimal comma and
1.234,56becomes1234.56.
What you get
Input CSV:
id,name,address.city,total,paid,joined,zip1,Ann,Tokyo,12800,true,2026-04-01,01500012,Bob,,5400.5,false,2026-04-03,5300001
With Nest dotted headers on, the JSON file holds:
[{"id": 1, "name": "Ann", "address": {"city": "Tokyo"}, "total": 12800, "paid": true, "joined": "2026-04-01", "zip": "0150001"},{"id": 2, "name": "Bob", "address": {"city": null}, "total": 5400.5, "paid": false, "joined": "2026-04-03", "zip": "5300001"}]
The other shapes of the same data:
| Output shape | Looks like |
|---|---|
| Array of objects (default) | [{"id": 1, ...}, {"id": 2, ...}] |
| NDJSON / JSON Lines | one {"id": 1, ...} object per line |
Keyed by a column (keyColumn: "id") | {"1": {"id": 1, ...}, "2": {"id": 2, ...}} |
| Columns as arrays | {"id": [1, 2], "name": ["Ann", "Bob"], ...} |
How to use
- File URLs: public links to CSV or TSV files, one per line (up to 50). Or a key-value store with CSV records, or datasets whose items hold
contentBase64and an optionalfileName(useful after another step produced the file). - Pick the Output shape. Everything else has a sensible default.
- Press Start. Each file becomes one JSON file in the run's key-value store; open the Converted files table for the download links.
{"fileUrls": ["https://example.com/exports/orders.csv"],"outputShape": "array","nestDottedHeaders": true,"stringColumns": ["zip"],"prettyPrint": false}
Options
- Detect numbers, true/false and null (on by default). A column becomes numbers only when every filled cell is a number, and booleans only when every filled cell is
trueorfalse(any case). Empty cells and the wordnullbecomenull. Everything else stays text: dates and timestamps (ISO dates are never converted), codes with leading zeros (007,09012345678) and numbers longer than 15 digits. - Always keep as text: list the headers of columns that must stay text even if they look like numbers.
- Decimal separator: point (
1234.56) or comma (1.234,56). - Nest dotted headers (off by default, so headers such as
v1.2are safe). If a file has bothaddressandaddress.city, it fails with a clear message instead of guessing. - Leave out empty values: skip keys whose value is
null. - First row is a header: turn off to get
column_1,column_2... Empty and repeated headers getcolumn_Nandname_2names, and rows with too few or too many cells are padded and counted asraggedRows. - Input encoding: detection is a best guess (the confidence is a rough guide). If the result looks garbled, set it yourself, for example
cp1250for Central European text orkoi8_rfor old Russian files. - Trim spaces, Input delimiter, Input encoding, Indent the JSON, Output file name.
- Also write the rows to the dataset: the first 10,000 rows of each file (50,000 per run) are also saved as dataset items with
_sourceand_row, so you can download or process them as an Apify dataset. The JSON file always holds every row. No extra charge.
Output
- Key-value store: the converted file under
outputKey(for exampleorders.json).outputUrlis Apify's signed public link, so you can share the file without sharing your token. - Dataset: one result row per file with
source,status,rows,columns,delimiter,encoding,encodingMethod,encodingConfidence,outputShape,columnNames,columnTypes,preview(the first two rows),outputBytes,outputUrlanderror. Items with_roware data rows from the option above. - STATS record: files converted and failed, rows converted and files charged.
{"recordType": "file","source": "https://example.com/exports/orders.csv","status": "ok","file": "orders.json","rows": 250,"columns": 3,"delimiter": "comma","encoding": "shift_jis","encodingMethod": "statistical","encodingConfidence": 0.97,"outputShape": "array","columnTypes": {"id": "integer", "customer.name": "string", "total": "integer"},"outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/orders.json?signature=..."}
Limits (cannot be raised by input)
- Up to 50 files per run, 15 MB and 100,000 data rows per file, 1,000 columns. A file over a limit fails for free; split it and run again.
- Public files only, no login. Links to internal network addresses are blocked. Records of a key-value store are read as UTF-8 when they are stored as text; store files in another encoding as binary records.
- If the maximum cost per run you set is lower than the number of files, the run stops cleanly (status Succeeded) after the files that fit; the status message and STATS (
stoppedAtChargeLimit: true) say so.
Pricing
Pay per event: $0.002 per converted file ($2 per 1,000 files), whatever the number of rows, no start fee. Failed files, files over a limit and the demo are free. Store discounts apply automatically: BRONZE -10%, SILVER -20%, GOLD -30%. On the Apify Free plan, the $5 of monthly platform credit covers about 2,500 files a month.
FAQ
Is a date converted to a date object? No. JSON has no date type, so 2026-04-01 stays the string "2026-04-01", exactly as written.
Why did my ID column stay text? Values with a leading zero (0150001), numbers longer than 15 digits and any column with a non-numeric cell are kept as written, so no digit is ever lost. Use Always keep as text to force other columns.
The characters are wrong. Check encoding and encodingConfidence in the result row. If the guess is wrong, choose the Input encoding yourself.
Does it change my values? Only their type. Text is not rewritten, numbers are not rounded, and the original file is never touched.
I need the reverse direction. Use JSON to CSV from the same developer.
If this Actor saved you time, a rating on the Store helps others find it.
More tools from the same developer
- JSON to CSV Converter — turn nested JSON files or datasets into one flat CSV file
- CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- Excel to JSON — turn Excel (XLSX) sheets into JSON rows, or a JSON file into an Excel sheet
- Flatten JSON to CSV — flatten nested JSON into flat rows with the separator you choose