Convert a JSON array into JSON Lines and back.
The JSON to JSONL converter turns a JSON array into JSON Lines, with one JSON value per line, and converts JSONL back into a normal JSON array. Use it to prepare data for log pipelines, BigQuery-style loads and machine-learning datasets that expect line-delimited JSON.
JSON Lines (also called newline-delimited JSON or NDJSON) is a text format where each line is one complete JSON value, usually an object, and lines are separated by a newline. Unlike a single JSON array, a JSONL file has no outer brackets and no commas between records, so a program can read it one line at a time, append new records by adding a line, and process files too large to load whole. Many data tools accept it, including log shippers, bulk-import APIs and training-data formats. Each line must be valid JSON on its own, and values must not contain raw line breaks (newlines inside strings are written as the escape sequence \n).
They describe the same idea: one JSON value per line, separated by newlines. The file extensions .jsonl and .ndjson are both used.
No. Each record must fit on one line. Pretty-printed JSON with line breaks inside a record is not valid JSONL.
When converting JSONL to JSON, blank lines are skipped. Some other tools do not accept them, so avoid blank lines in files you share.
Yes. Each value is written in the order it was parsed, and the order of the array is preserved.
No. The conversion runs in the page and nothing is sent anywhere.