Skip to content

Convert JSON to JSON lines

Convert a JSON array to JSON lines, or JSON lines back to a JSON array.

JSONJSONLNDJSONText

Upload

Files (0–1)
A JSON array or a JSONL document, up to 16 MB, or paste its text below (up to 1 MB).
Paste the JSON array or the JSONL lines instead of uploading a file. The same caps and rules apply.

Options

Questions people ask
What is a record here?
In JSONL, the thing on one line: an object, array, string, number or null all count. A line like "text" without quotes is not JSON and refuses with its line number; records are read independently, so the other lines parsed fine.
Is the output pretty or compact?
Array to lines: one compact record per line (no spaces, keys in their original order) for one-obj-per-line streaming. Lines to array: an indented, readable JSON array, because its purpose is to be re-read by a human or by any JSON parser.
What floats refuse and why?
Numbers that are not finite: 1e400 (a parser would bump it to infinity), driven-out NaN and Infinity literals. A converter whose output language has no such value cannot hand one over honestly, so the run refuses and names the first line or element.
Does it read my line endings?
Both: LF and CRLF lines both work, and Unicode survives as-is (the tool reads UTF-8, BOM tolerated; any other encoding is refused rather than guessed). A trailing newline at the end of the document is normal and not an empty record.
What are the limits?
16 MB uploaded or 1 MB pasted, 32 MB of output, one million records, nesting to 512 levels, and finite numbers only. The structure scan is iterative, so a depth bomb is refused with a message instead of crashing the run.
What happens to my files?
The upload is deleted as soon as processing finishes; the converted file stays downloadable for about 10 minutes, then is deleted automatically.