How to Convert NDJSON / JSONL to Excel
NDJSON (Newline Delimited JSON), also known as JSONL (JSON Lines), is a format where each line is a complete JSON object. This guide shows how to convert these files into Excel spreadsheets.
What is NDJSON used for?
NDJSON is popular in logging systems (like structured application logs), streaming APIs, database exports (MongoDB, Elasticsearch), data pipelines, and machine learning datasets. Its line-by-line structure makes it easy to stream, append, and process incrementally.
How the conversion works
Each line is parsed as an independent JSON object.
All keys from all lines are collected to form the column headers (union of all keys).
Nested objects are flattened with dot notation.
Lines missing a key get an empty cell for that column.
The result is a standard tabular spreadsheet.
Common sources of NDJSON files
Application logs:: Structured logging frameworks like Pino, Winston, and Bunyan output NDJSON.
Database exports:: MongoDB's mongoexport and Elasticsearch's scroll API produce NDJSON.
API responses:: Some streaming APIs return NDJSON instead of a single JSON array.
Data science:: Hugging Face datasets and many ML tools use JSONL format.
Tips
If your file is very large (over 10 MB), the conversion may take a few seconds. The progress bar shows the current status.
After converting, use Excel's filter feature to find specific log entries or events.
Sort by timestamp column to see events in chronological order.