Compare
JSON Lines vs Parquet
JSON Lines stores an independent JSON value on each UTF-8 text line. Parquet is a binary column-oriented file with row groups and column chunks.
Which format should you choose?
Consider JSONL for producing and ingesting events one at a time; consider Parquet for reading selected columns from consistently typed analytical data.
Good fit for JSON Lines
Logs and records processed line by line · Streaming exchange of JSON records
- Reading and writing records incrementally
- Appending or combining text data with common tools
Good fit for Parquet
Store structured tables for analytics
- Large datasets read by selected columns
Basic information
| Field | JSON Lines | Parquet |
|---|---|---|
| Extension | .jsonl, .ndjson | .parquet |
| MIME type | application/jsonl | application/vnd.apache.parquet |
| Common uses | Logs and records processed line by line · Streaming exchange of JSON records | Store structured tables for analytics |
| How to open | Open the file in a text editor or a JSON Lines-aware tool. Validating each line as JSON makes it easier to identify the record containing a syntax error. | Use a Parquet-aware tool to inspect schema, column types, row counts, and values. |
| Export or convert | To create a JSON array, collect the lines as array elements. To convert an array to JSON Lines, write each value on its own line. For large files, consider memory use during conversion. | From CSV or other formats, check types, nulls, timestamps, encoding, partitions, and row counts. |
Choose by use case
Reading and writing records incrementally
Logs and records processed line by line · Streaming exchange of JSON records
JSON LinesAppending or combining text data with common tools
Logs and records processed line by line · Streaming exchange of JSON records
JSON LinesLarge datasets read by selected columns
Store structured tables for analytics
ParquetKey point 1
JSONL can be parsed line by line. A final newline makes appending and concatenating records easier.
More on the differencesKey point 2
Parquet readers locate column chunks through file-end metadata; simple text-line appends are not the same operation.
More on the differencesMore on the differences
Benchmark the same data, compression, and tools rather than assuming one format is always faster or smaller.
- Define schema and column types during conversion; check missing fields versus null, integer precision, timestamps, and nested values.
- JSONL also permits scalar values and arrays as complete records; decide how heterogeneous records become rows before conversion.
Frequently asked questions
Can JSONL become Parquet without defining types?
A converter must assign values to a schema and types, whether explicitly configured or inferred. Validate the mapping and reject unexpected values.