CSV / Excel to JSON Converter avatar

CSV / Excel to JSON Converter

Pricing

from $0.05 / 1,000 csv/json rows

Go to Apify Store
CSV / Excel to JSON Converter

CSV / Excel to JSON Converter

Convert CSV, TSV, and Excel files to JSON or JSONL, or flatten JSON into CSV-ready rows. Includes type inference, nested header handling, delimiter sniffing, and duplicate removal.

Pricing

from $0.05 / 1,000 csv/json rows

Rating

0.0

(0)

Developer

林 吴

林 吴

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 hours ago

Last modified

Categories

Security

Limited permissions

Share

Convert tabular files to clean JSON, or turn JSON into CSV-ready flat rows. Built for ETL jobs, spreadsheet imports, and automation workflows.

What it does

  • Reads CSV, TSV, JSON, JSONL, and Excel (.xlsx) files
  • Auto-detects the format: XLSX by file signature, JSON/JSONL by content, otherwise CSV
  • Sniffs CSV delimiters (;, |, tabs) and handles UTF-8 BOM, GB18030, and CP1252 encodings
  • Converts CSV/Excel to JSON with type inference (numbers, booleans, nulls)
  • Splits dot-notation headers such as user.email into nested objects
  • Flattens nested JSON into dot-notation columns when the target is CSV
  • Optional duplicate-row removal
  • Handles multi-sheet Excel workbooks and adds a _sheet field per row

Input

FieldTypeDescription
raw_textstringRaw CSV, TSV, JSON, or JSONL content
source_urlstringOptional public URL to a file (max 30 MB); ignored when raw_text is set
source_formatenumauto, csv, tsv, json, jsonl, xlsx
target_formatenumjson pushes nested objects; csv pushes flat rows
delimiterstringOptional delimiter override; empty = auto
sheet_namestringOptional Excel sheet; empty = all sheets
flattenbooleanFlatten nested JSON for CSV output
nest_headersbooleanSplit dot-notation headers into nested objects
infer_typesbooleanConvert CSV strings to numbers/booleans/nulls
dedupebooleanRemove identical rows after conversion
max_rowsintegerInput cap, default 20,000 (0 = unlimited)

Example: CSV to JSON

{
"raw_text": "name,email,age,active\nLin,lin@example.com,42,true",
"target_format": "json",
"infer_types": true
}

Example: JSON to CSV-ready rows

{
"raw_text": "[{\"user\": {\"name\": \"Lin\", \"email\": \"lin@example.com\"}, \"score\": 42}]",
"target_format": "csv"
}

Output for the JSON-to-CSV example:

{
"user.name": "Lin",
"user.email": "lin@example.com",
"score": 42
}

Output

Each converted row is pushed as one item to the default dataset. For target_format: csv, rows are flat and can be exported as CSV directly from the Apify dataset UI or API. The run summary is stored in the key-value store under SUMMARY.

Pricing

Pay per event. You pay $0.00001 per output row, which is $0.01 per 1,000 rows. Failed runs are not charged the per-row fee.

Notes

  • Dates are kept as strings to avoid silent format changes; convert them downstream if needed.
  • For Excel files, only the first row of each sheet is treated as the header.
  • No external AI model is called; conversions are deterministic and fast.