SmartQueryTools

Convert Arrow to NDJSON Online

Convert Arrow files to NDJSON format directly in your browser. No upload required — your data never leaves your device.

About converting Arrow to NDJSON

Arrow to NDJSON suits pipelines built around line-oriented tools. An Arrow file is a sequence of binary record batches that only an Arrow library can read. NDJSON is one JSON object per line, which jq, grep, a shell loop or a log shipper such as Vector or Fluent Bit can process. Converting lets a batch produced by Polars or pyarrow flow into an Elasticsearch bulk load, a BigQuery load job or a JSONL training file, provided the columns already have the names and nesting the target expects.

Both formats grow by appending, in different ways. The Arrow streaming format writes batch after batch with no footer, and NDJSON writes line after line. A process that logs Arrow batches during a run can therefore be turned into a line log afterwards. Wait until the writer has closed the stream, because a file cut off in the middle of a batch will not load.

Expect a much bigger file. Every line repeats every key, and dictionary-encoded strings, which Arrow stores once, are written out in full on every line. Compress the result with gzip if it has to travel, since BigQuery and many other loaders accept gzip-compressed JSONL directly.

Worked example

A small orders export with an ID, a customer name, a date, an amount (one missing) and a true/false flag, converted with the default settings.

Input (Arrow)

Arrow IPC file (binary, columnar) — shown as a table with its schema

order_idcustomerorder_dateamountshipped
1001Acme Ltd2026-03-02249.5true
1002Brightside Co2026-03-021200false
1003Acme Ltd2026-03-0589.99true
1004Northwind2026-03-07NULLfalse

Schema: order_id BIGINT, customer VARCHAR, order_date DATE, amount DOUBLE, shipped BOOLEAN

Output (NDJSON)

{"order_id":1001,"customer":"Acme Ltd","order_date":"2026-03-02","amount":249.5,"shipped":true}
{"order_id":1002,"customer":"Brightside Co","order_date":"2026-03-02","amount":1200,"shipped":false}
{"order_id":1003,"customer":"Acme Ltd","order_date":"2026-03-05","amount":89.99,"shipped":true}
{"order_id":1004,"customer":"Northwind","order_date":"2026-03-07","amount":null,"shipped":false}

What changes when you convert Arrow to NDJSON

  • Each Arrow row, across all record batches, becomes one compact JSON object on its own line.
  • int64 values up to 9,007,199,254,740,991 in size stay numbers. uint64 and int64 values beyond that are written as strings so no digits change.
  • timestamp[ns] and timestamp[us] values are shortened to millisecond strings such as "2026-03-02 09:15:00.123". time32 and time64 columns are written as clock-time strings such as "09:15:00", with a fraction only when the value has one.
  • Struct and list values stay nested inside the line. Line breaks inside strings are escaped as \n, so a record never spans two lines.
  • Nulls are written as null and the key is kept, so every line has the same set of keys.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Frequently Asked Questions

Will every line be valid JSON even if my text columns contain line breaks?

Yes. Line breaks, tabs and quotes inside strings are escaped by the JSON encoder, so each record is exactly one line and tools that split on newlines stay correct.

Why is the NDJSON so much larger than the Arrow file?

Arrow stores each column name once in the schema and can store repeated strings once in a dictionary. NDJSON writes every key and every string value on every line. Five to twenty times larger is common for wide tables.

Can I convert an Arrow stream while it is still being written?

No. The whole file is read at once, and a stream that ends part-way through a batch will not load. Convert it after the writer has closed the stream.

What is NDJSON format?

NDJSON (Newline-Delimited JSON) stores one JSON object per line, making it easy to stream, append, and process incrementally.

Related Tools