Converter
Paste JSON Lines below, press Convert, and copy the PHP array output.
Convert JSONL to PHP array free in your browser. Paste your JSON Lines on the left, press Convert, and copy clean PHP array on the right. No sign-up, no uploads.
Paste JSON Lines below, press Convert, and copy the PHP array output.
Each non-empty line is parsed as its own JSON object and treated as one row, so a 10,000-line file is simply 10,000 rows. The converter collects the union of all keys across lines to build the column set, which means ragged objects with different keys still convert cleanly, with blanks where a line lacked a key.
The snippet assigns $data, so rename the variable or wrap it in a return statement if you are building a config file. It is also a quick way to seed Laravel or WordPress fixtures: convert, paste into a seeder, and the nested array() syntax works on every supported PHP version.