JSONL / NDJSON to CSV — streaming converter
Pricing
Pay per usage
JSONL / NDJSON to CSV — streaming converter
Stream a JSONL/NDJSON document (inline text or public URL) into a CSV. Auto-discovers columns from the union of all keys in document order of first appearance. No scraping required when text is provided inline.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Nikita S
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
JSONL / NDJSON to CSV Converter
Stream a JSONL/NDJSON document (inline text or public URL) into a CSV. Auto-discovers columns from the union of all keys in document order of first appearance, with optional explicit column list and stable ordering. Pure data utility, no HTTP scraping required when text is provided inline.
- Inputs:
text(inline JSONL) ortextUrl(public JSONL file),columns(optional explicit list),delimiter(default,),maxRows,maxChars,includeSummary. - Per-row output:
_kind: "header"— first dataset row, with the CSV header line and resolvedcolumnsarray._kind: "row"— one dataset row per data row of the converted CSV._kind: "summary"(optional) — columns, counts, and a 5-line CSV preview.
- Output (
SUMMARY):columns,counts(parsed, bad, written, lines).OUTPUTkey-value store holds the full CSV body.
Quick start
apify call stellar_ballet_0bu/jsonl-to-csv -i '{"text": "{\"id\":1,\"name\":\"alice\",\"email\":\"a@x.com\"}\n{\"id\":2,\"name\":\"bob\",\"team\":\"ops\"}\n{\"id\":3,\"name\":\"carol\",\"email\":\"c@x.com\",\"team\":\"sales\"}\n","columns": ["id","name","email","team"],"includeSummary": true}'
The default dataset will have ~5 items: 1 header + 3 row + 1 summary. OUTPUT key-value record holds the full CSV text.
Inputs
text— inline JSONL/NDJSON body. If set,textUrlis ignored.textUrl— public URL of a JSONL/NDJSON file. Used only iftextis empty.columns— optional explicit column list. If empty, columns are auto-discovered from the union of all keys in document order of first appearance.delimiter— CSV delimiter character (default,).includeSummary— if true, push a_kind: "summary"row with totals + column list.maxRows— stop after this many converted rows.0means unlimited.maxChars— truncate the input body at this many characters before parsing. Default 5,000,000.
Use cases
- Convert a JSONL API export into CSV for Google Sheets / Airtable / Supabase (one line per dataset row, plus the full CSV in the
OUTPUTkey-value record). - Pre-process logs before loading into a warehouse or feeding into
csv-join-enricherorcsv-statistical-summary. - Materialise a flattened JSON dataset as CSV after
json-flatten-normalizer. - Cleanup step for
apify-dataset-export-batchwhen the source platform only emits JSONL.
API notes
- Pure data utility, no scraping when
textis supplied inline. - Blank lines and lines starting with
#are skipped (comment-aware). - Lines that fail to parse are counted as
badand skipped, not crashed on. - CSV escaping: fields containing the delimiter, a quote, or a newline are quoted and embedded quotes are doubled (
""). - Header row is the resolved
columnsarray; for a row missing a key, the cell is empty. - Nested objects/arrays in the JSONL are stringified to JSON for the CSV cell (no flattening here — use
json-flatten-normalizerfirst if you need a flat schema).
Pricing (Pay per event)
| Event | Description | USD |
|---|---|---|
apify-actor-start | Built-in start charge, per Apify platform usage | per pricing tier |
row_converted | One charge per converted data row (skips blank lines and # comments). | $0.0001 |
apify-actor-start is auto-charged by Apify platform; row_converted is the only domain-specific event. |
currentPricingInfo activates on 2026-07-22T00:00:00Z. The Actor's code calls Actor.charge({ eventName: 'row_converted', count }) only for successfully converted data rows.
Cost expectations
A 100k-line JSONL input will cost roughly $10 of usage credits on top of the standard start charge. Set maxRows to cap the run if you only need a preview.
FAQ
Does it preserve key ordering? Yes — columns are emitted in document order of first appearance, or in the explicit order you pass via columns.
What happens if a row is missing a key present in another row? The cell is left empty. No crash, no implicit null placeholder.
What happens if a row has a key not present in other rows? That key is added to the resolved columns list at the position of its first appearance.
Can I split a big JSONL file into chunks? Yes — run this Actor N times with maxRows: <chunk-size> and chain via apify-dataset-export-batch for downstream consumers.
What about arrays/objects in cells? They are stringified to JSON. Use json-flatten-normalizer first if you need each array element as its own column.
Does the output CSV escape special characters? Yes — RFC 4180: fields containing the delimiter, a quote, or a newline are wrapped in quotes; embedded quotes are doubled.
Limits
- Best for inputs up to ~5M characters per run. For larger inputs, split into chunks or fetch via
textUrl(subject to the platform's fetch limits). - Single-pass streaming: the entire input is held in memory while parsing. For multi-GB JSONL, run in shards.
Related Actors
json-flatten-normalizer— flatten nested objects before CSV conversionjsonl-stream-validator— validate a JSONL stream against a JSON Schema before conversionjson-schema-validator— validate an array of records against a schemacsv-join-enricher— join the resulting CSV with another CSV by keycsv-quality-scorecard— score the resulting CSV's qualitycsv-dedupe-normalizer— dedupe the resulting CSVcsv-statistical-summary— column-level stats on the resulting CSVapify-dataset-export-batch— batch export multiple Apify datasets to JSON/JSONL/CSV
Support
- Source: hidden (paid Actor pattern; not exposed by default).
- Issues / feature requests: open a thread on the public Apify Store Actor page (button on the right of the Store listing) or message the maintainer through the Apify Console.
- For paid-pilot bulk runs (multi-GB JSONL files, scheduled conversion pipelines, custom output formats), contact the maintainer via the Apify Console.
License
MIT-style Apify Actor Source-Available License. You may use the public Actor output and integrate the public results; you may not re-host the Actor source or re-publish it as a competing Actor.