EditSafely

Convert JSON to JSONL

Convert a JSON array to line-delimited JSONL.

Runs on your device, nothing uploaded

Rows fromEmpty finds the list automatically.
Try:

0 chars · 0 lines

Output

Convert a JSON array to line-delimited JSONL.

Type or paste above to see the result here.

Example: Convert an array to JSON Lines

What you paste never leaves this tab

Convert JSON to JSONL is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, an API response with live access tokens in it is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.

  • No upload
  • No length limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Convert JSON to JSONL

  1. 1. Paste your JSON array. Paste a JSON array where each item is the record you want on its own line, such as a list of log events or training examples.
  2. 2. Review the JSONL output. There are no settings to adjust: each array item is minified and written on its own line, with no surrounding brackets or commas between records, matching the JSON Lines convention exactly.
  3. 3. Copy the JSONL result. Copy the line-delimited output and save it as a .jsonl file, ready for tools that stream records one at a time, such as log processors or machine learning data loaders.

When to use Convert JSON to JSONL

Convert JSON to JSONL turns a JSON array into JSON Lines, also called newline-delimited JSON, where each record sits on its own line instead of inside a shared array. This format lets consumers process one record at a time without loading the entire array into memory first.

  • Preparing training data for a machine learning pipeline. Many ML frameworks expect training examples as JSONL, one JSON object per line, rather than a single large JSON array, especially for streaming large datasets.
  • Formatting logs for a streaming ingestion pipeline. A log aggregation tool consumes one JSON event per line rather than a full array, and your events currently sit together inside a single JSON array from an export.
  • Appending records without rewriting an entire file. You want a file format where new records can be appended to the end without parsing and rewriting the whole document, which a single large JSON array does not support cleanly.
  • Feeding bulk data into an Elasticsearch or similar bulk API. A bulk import API expects newline-delimited JSON documents rather than one large array, and your source data currently lives as a single JSON array.

Examples

Convert an array to JSON Lines

Input

[{"a": 1}, {"a": 2}]

Output

{"a":1}
{"a":2}

Write the records inside a wrapper object

Input

{"data": [{"a": 1}, {"a": 2}], "meta": {"tags": ["x"]}}

Output

{"a":1}
{"a":2}

About the Convert JSON to JSONL tool

Convert JSON to JSONL does its work locally, right in the browser. Convert a JSON array to line-delimited JSONL. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the JSON Tools collection on EditSafely, a set of 90 small, focused JSON utilities that share the same instant, private workspace.

You can shape the output with the Rows from setting, and the result refreshes the moment you change it. 2 worked examples further down the page show exactly what the tool produces for real inputs.

Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Does Convert JSON to JSONL cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.

Related tools

All JSON Tools →