Category: Developer tools
JSON Lines Converter
Convert between JSON Lines (NDJSON) and a JSON array
Convert JSON Lines (JSONL/NDJSON) into one JSON array, or split a JSON array or object back into JSON Lines. Each row is validated on its own, in your browser.
3 of 3 line(s) parsed successfully.
[
{
"id": 1,
"name": "Ada Lovelace"
},
{
"id": 2,
"name": "Grace Hopper"
},
{
"id": 3,
"name": "Alan Turing"
}
]Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
Convert JSON Lines (JSONL/NDJSON), one JSON value per line, into a single JSON array, or split a JSON array or object back into JSON Lines. Each row is validated on its own. Runs entirely in your browser. JSON Lines is the format most log pipelines, ML datasets and streaming exports use: one complete JSON value per line, so a file can be read or appended to a line at a time. This tool parses each line independently, reporting how many parsed and where the first broken row is, then joins the valid values into one pretty-printed JSON array. The reverse direction takes a JSON array (or a single object) and prints one compact JSON value per line.
How to use it
- Pick the direction first: choose JSONL to array when you have newline-delimited records, or array to JSONL when you already have a JSON array and need one record per line.
- Paste your JSON Lines text, or a JSON array or single JSON object for the reverse direction. Every line is parsed independently, so one malformed row does not stop the rest of the file from converting.
- Read the valid row count and the position of the first broken row, then copy the result: a pretty-printed JSON array in one direction, one compact JSON value per line in the other.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- How do I use JSON Lines Converter?
- Three steps: choose JSONL to array or array to JSONL, paste your JSON Lines text or JSON array/object, then check the valid row count and copy the converted result. There is nothing to install and no command line involved.
- Which inputs and options does JSON Lines Converter support?
- The input is either JSON Lines text (JSONL/NDJSON, one complete JSON value per line) or a JSON array or single JSON object. The only option is the conversion direction. Each row is validated on its own, so records with different keys still convert.
- How do I view or copy the result?
- The result appears on the page: a pretty-printed JSON array when converting JSONL to an array, or one compact JSON value per line in the reverse direction. Above it you get the count of rows that parsed and where the first broken row is, then you copy the output.
- Is my input, file, or result uploaded?
- No. The conversion runs entirely in your browser. Inputs, files, settings and results stay on your device and are not uploaded to LocalTools, so log excerpts or dataset rows with sensitive fields never leave the machine.
- What does this tool not support?
- It converts only between JSON Lines and a JSON array or object. There is no CSV, Parquet, Excel or YAML conversion, no accounts or cloud history, and no server-side batch processing. Use a dedicated tool when you need a tabular format.