JSONL ⇄ JSON Converter
Convert newline-delimited JSON (JSONL) into a standard JSON array, or back to JSONL. No file size worries — up to 200MB is supported.
Or convert a file directly — supports files up to 200MB
Drag & drop a file here, or click to browse
Processed in the background, so the page stays responsive even for huge files
How to use this tool
Pick JSONL → JSON to wrap the lines in one array, or JSON → JSONL to write each array item on its own line. Upload accepts .jsonl and .ndjson in the first direction and .json in the second. A file over 5 MB is converted in the background, up to 200 MB, and the result is downloaded instead of shown.
Which direction do I need?
Look at the first character of the file, not its extension. [ means a JSON array, so use JSON → JSONL. { with one whole record per line means JSONL. Getting it wrong doesn't always fail loudly:
- A minified array such as
[{"id":1},{"id":2}]pasted into JSONL → JSON is read as one line holding one value, and comes out as[[{"id":1},{"id":2}]], an array inside an array. If your output starts with[[, switch direction. - The same array spread over several lines fails on line 1 with an "unexpected end" message, because
[on its own isn't a complete value. - A line ending in a comma,
{"id":1},, is left over from an array and is rejected with a message naming that line. Remove the commas and the surrounding brackets.
What goes on each line
JSON → JSONL writes each array item as it is, so the items don't have to be objects. [{"id":1}, "plain text", 42, [1,2], null] becomes five lines: {"id":1}, "plain text", 42, [1,2] and null. Converting back gives the same array. A single object instead of an array becomes a one-line file. Every line is compact, with no spaces after colons or commas, and characters such as ₹ and é are written as they are, not as \u escapes.
Frequently Asked Questions
Does it accept Windows line endings, or a file saved with a byte-order mark?
Yes to both. Each line is trimmed before it is parsed, which removes the carriage return that Windows adds and the invisible byte-order mark some editors put at the start of a UTF-8 file. Blank lines are skipped too, including one at the end of the file.
Can a JSONL file contain comments or single-quoted strings?
No. Every line has to be strict JSON, so {'id': 1} fails with a message about a property name on that line, and a line starting with // or # is rejected the same way. Some logging libraries write Python-style dicts with single quotes; those need converting to real JSON first.
Does this work with very large JSONL files, like multi-gigabyte log exports?
Up to 200MB. Anything over 5MB is processed in a background worker so the page stays responsive, but the whole file still has to fit in the browser's memory. For multi-gigabyte exports, a streaming command-line tool that reads one line at a time is the better fit.
Related Tools
Related Blog Posts
How to Flatten Nested JSON and Convert JSONL Files
How dot-notation flattening turns nested objects and arrays into spreadsheet columns, what survives the trip back, and how JSON Lines differs from a normal JSON file.
Read moreHow to Convert JSON to Excel, CSV, XML and YAML (and Back)
What actually happens to your data when JSON becomes a spreadsheet, XML, or YAML: missing keys, nested values, leading zeros, and the XML array problem, with real converter output.
Read moreConverting CSV and XML to Excel Without Losing Data
Why double-clicking a CSV mangles PIN codes, long IDs and ₹ signs, what a careful CSV-to-Excel conversion does instead, and how XML records map to spreadsheet columns.
Read more