JSONL to CSV Converter — one record, one row
Paste JSON Lines and get a clean CSV. Every record becomes a row, nested fields become columns, and it all happens in your browser — your log data never touches a server.
.field .[0] .[] select(.f == "x")
What is a JSONL to CSV converter?
A JSONL to CSV converter turns JSON Lines into CSV. JSON Lines (also called .jsonl, .ndjson, or newline-delimited JSON) is a format where every line of the file is one complete, self-contained JSON value. No wrapping array, no commas between records — just one record per line.
That format shows up everywhere: application logs, event streams, message-queue dumps, model training datasets, database change-data-capture exports, and the output of most command-line tools that emit structured records. It is deliberately streamable — you can process a 10 GB file one line at a time without loading it all into memory.
CSV is the other half of the equation. It is the format every spreadsheet, BI tool, and database bulk loader understands. Converting JSONL to CSV turns a machine-readable stream into something you can filter, pivot, and chart in Excel without writing a single line of code.
HopConvert handles the messy parts: it reads each line independently, unions the keys across every record so sparse records still line up, flattens nested objects into columns like props__device, joins arrays of primitives with | , and skips (and reports) any line it cannot parse instead of failing the whole file. And it does all of it in your browser — the file is never uploaded anywhere.
How to convert JSONL to CSV in 4 steps
Most conversions take under a minute. No login, no upload to a server, no installation.
-
Paste or upload
Drop a
.jsonlor.ndjsonfile into the upload zone, or paste JSON Lines text directly into the box. The converter parses each line as you go. -
Choose options
Open the settings cog to pick a delimiter (comma, tab, semicolon, pipe) and whether nested objects become one wide row or expand into detail rows.
-
Preview
The live preview table updates instantly so you can confirm the column layout and row count before downloading anything.
-
Download
Click Download CSV to save the file. It opens directly in Microsoft Excel, Google Sheets, Numbers, or any spreadsheet app.
Built for the JSON Lines you actually have
Real-world JSONL streams are sparse, nested, and occasionally malformed. HopConvert handles them so you do not have to.
True line-by-line parsing
Each line is parsed independently, exactly like a streaming reader would. A 200 MB log file converts in seconds because nothing is loaded twice.
Union of all columns
Records rarely share the same keys. The converter builds the column set from every record, so missing fields simply become empty cells.
Browser-only privacy
Log files often contain user IDs, IPs, and request bodies. Every byte is processed locally in JavaScript — nothing is uploaded, logged, or stored.
jq-style filtering
Filter records before conversion with select(.event == "purchase") or extract a sub-array with .props — no scripting required.
Bad lines are reported
If one record is malformed, the converter skips it and tells you the line number instead of discarding the whole file.
Live preview
See the columns and rows before you commit. Nothing is written to disk until you click Download.
JSONL vs JSON vs CSV: what is the difference?
Three formats, three very different jobs. Knowing which one you have saves a lot of confusion.
| Aspect | JSONL | CSV |
|---|---|---|
| Structure | One JSON value per line, no wrapping array | Flat rows and columns separated by a delimiter |
| Best for | Log streams, event pipelines, append-only records | Spreadsheets, BI tools, database bulk loads |
| Streaming | Reads line by line | Needs the whole file in memory to parse reliably |
| Nesting | Full JSON nesting allowed per line | None — must be flattened |
| File size | Larger than CSV, much smaller than pretty-printed JSON | Smallest of the three |
| Appending | Trivial — add a line | Rewrites the whole file |
| Easy to open in Excel | Needs conversion | Opens directly |
When teams reach for JSONL to CSV
JSONL is the default output format of modern data tooling. Converting it to CSV is how that data becomes analysable.
Application log analysis
Ship a JSONL log out of your service, convert it to CSV, and pivot on status codes, latency, or user in Excel.
Event stream exports
Kafka consumers, Segment, and Stripe all emit JSONL. Bulk-load it into BigQuery, Snowflake, or Postgres via CSV.
ML dataset preparation
Training datasets often arrive as JSONL. Convert to CSV to inspect label balance in a spreadsheet before training.
API request captures
Capture raw request/response bodies as JSONL, then convert to CSV to find slow endpoints and error clusters.
Database change streams
Debezium and CDC tools emit change events as JSONL. Convert to CSV to audit what changed and when.
CI and test fixtures
Turn failing test output into a CSV you can attach to a bug report or paste into a ticket.
JSONL to CSV: the complete guide
Everything you need to know about JSON Lines, how the format differs from a JSON array, and how to get clean CSV out of it.
Read the full JSONL to CSV guide
Related tools: JSON to CSV guide · CSV to JSON
What exactly is JSON Lines?
JSON Lines (also written jsonl, ndjson, or newline-delimited JSON) is a text format in which each line is one complete and independent JSON value. There is no enclosing array and no comma between records. The format was popularised by the creators of jsonlines.org and is now used by Elasticsearch, MongoDB, CouchDB, BigQuery, and most modern log shippers.
A minimal example:
{"id": 1, "event": "page_view", "user": "alice"}
{"id": 2, "event": "purchase", "user": "bob", "amount": 49.99}
{"id": 3, "event": "signup", "user": "carol"}
Notice that each record carries its own id. That redundancy is the point: every line stands alone, so a reader can process, route, or discard it individually. A JSON array of the same three records would need to be opened, scanned, and closed as one unit, and a single syntax error anywhere would break the entire file.
JSONL or a JSON array?
These hold the same information but behave very differently:
- A JSON array is a single document. It must be valid from the first
[to the last]. You cannot append to it without rewriting it, and a truncated file is unparseable. - JSON Lines is a stream. Records are appended as they arrive, consumers read them one at a time, and a damaged line only affects that line.
That is why almost every log pipeline, event bus, and streaming database uses JSONL. When you convert JSONL to CSV, you are essentially freezing a stream into a table.
What shape is the output?
The converter produces a standard CSV: one header row of column names, then one row per record. Column names come from the union of the keys across every record, so if record 4 has a plan field that the first three do not, plan becomes a column and the other rows get an empty cell in it.
CSV output uses CRLF line endings and RFC 4180 quoting: any field containing a comma, a double quote, or a newline is wrapped in double quotes with inner quotes doubled. Values are written as text, which is exactly what spreadsheets expect.
How is nested data handled?
JSONL records are often not flat. The converter offers two strategies:
- Header / detail (default): A nested object such as
{"id": 1, "props": {"device": "mobile"}}is flattened into two columns:idandprops__device. The separator is configurable in settings. - Flatten: The same result, but with nested arrays of objects also flattened into wider columns rather than expanded into extra rows.
Arrays of primitive values — tags, skills, categories — are joined with | so they stay readable in a single cell. Arrays of objects become one row per element with the parent fields repeated, which is the classic header/detail layout your BI tool expects.
What about records with different keys?
This is the normal case, not an edge case. Event streams are sparse by design: a purchase event carries an amount, a page_view does not. The converter builds the column set from every record it reads, so all rows share the same columns and missing values are simply blank.
This is also why column order is derived from first appearance rather than sorted alphabetically — the first record in the file decides the leading columns, which usually matches the order the producer writes them in.
Common edge cases
- Malformed lines: Skipped and reported with their line numbers. The rest of the file still converts.
- Blank lines: Ignored entirely.
- UTF-8 BOM: Detected and stripped from the first line.
- CRLF and LF endings: Both parse correctly, even if mixed within one file.
- Top-level arrays per line: If a line holds a JSON array instead of an object, it is treated as a single record and stringified into one cell.
- Very long lines: There is no line-length limit; only your tab's memory is the constraint.
- Duplicate keys within one line: The last occurrence wins, matching
JSON.parsebehaviour.
Using JSONL in a real pipeline
A common end-to-end flow looks like this:
curl -s https://api.example.com/events.jsonl \
| jq -c 'select(.status != 200)' \
| ./hopconvert-jsonl-to-csv \
> errors.csv
Or, entirely in the browser, using the filter box on the converter:
select(.event == "purchase")
That filter keeps only purchase events. Combine it with a path such as .props to convert just the nested payload into columns.
For very large files, remember that conversion happens in your browser — the practical ceiling is your tab's available memory. Close other tabs, use a 64-bit browser, and expect roughly 50 MB per second of throughput on a modern laptop.
Frequently asked questions
Everything you need to know about converting JSON Lines to CSV with HopConvert.
What is a JSONL to CSV converter?
Is HopConvert free to use?
Do I need to create an account?
Is my data private and secure?
What is the difference between JSONL and NDJSON?
.jsonl and .ndjson are used interchangeably, and HopConvert accepts both.Can I paste a regular JSON array instead?
[, the converter parses it as a standard JSON array and converts it the same way. That makes it easy to use this tool as a general JSON-to-CSV converter.What happens if a line is not valid JSON?
How do I convert nested objects in JSONL?
parent__child by default — for example props.device becomes props__device. You can change the separator in settings, or switch to the flatten strategy to widen arrays of objects too.What is the maximum file size?
Can I filter records before converting?
select(.event == "purchase") or .props. It runs entirely in your browser and updates the preview as you type.Turn your log into a table
Free, instant, and private — your log never leaves this tab.