How to Convert JSONL to JSON
JSON Lines is perfect for streaming and logs, but when you want to load a whole dataset into a single variable, run it through a JSON path query, or hand it to a tool that expects an array, you need one combined JSON document. This converter does exactly that. It reads your input line by line, parses each line as independent JSON, and wraps the results into a single array. Because every line is validated on its own, a mistake is reported with its exact line number instead of a vague failure. Blank lines are skipped, nested structures are preserved, and you can pretty-print with 2 or 4 spaces or output compact JSON. Copy or download. Everything runs in your browser, so nothing is uploaded.
Paste your JSONL
Paste your line-delimited JSON or load the sample; it's parsed locally with nothing uploaded.
Choose formatting
Toggle pretty-print and pick 2 or 4 space indentation.
Copy or download
Grab the JSON array with one tap or save it as a .json file.
JSONL vs JSON — What's the Difference?
JSONL — JSON Lines / NDJSON
A format where every line is a complete, independent JSON object. It streams and appends easily and is common for logs, exports and machine-learning datasets — but it isn't a single valid JSON document on its own.
JSON array
One document that wraps every record in a single set of brackets. It's what most APIs, config loaders and JSON path tools expect. Converting JSONL to JSON gives you that single array ready to parse in one call.
Common Use Cases
Load a whole dataset
Combine NDJSON records into one array you can parse in a single call.
Feed array-only tools
Give a JSON array to APIs and libraries that don't accept line-delimited input.
Run JSON path queries
Query the combined array with tools that expect a single JSON document.
Inspect log exports
Turn line-based logs into a readable, pretty-printed array.
Import into apps
Many apps import a JSON array but not raw NDJSON — this bridges the gap.
Debugging
Pretty-print JSONL to spot the record that's causing trouble.
Data review
See all records together with clean indentation for a quick scan.
Quick reshaping
A fast, no-install way to turn records back into one array.
Tips & Best Practices
One JSON value per line
Each line must be a complete JSON value on its own; that's what makes JSONL parse cleanly.
Read the line number
If a line is invalid, the error tells you exactly which one, so you can jump straight to it.
Pretty-print for humans
Use indentation when a person will read the output; use compact JSON for machines.
Blank lines are fine
Empty lines between records are skipped automatically, so you don't need to strip them first.
Match your indent style
Pick 2 or 4 spaces to match your codebase before pasting the result in.
Troubleshooting
It reports an invalid line
One line isn't valid JSON on its own. The message includes the line number — check that line for a trailing comma, single quotes or an unclosed bracket.
My whole file failed
The input may already be a JSON array, not JSONL. This tool expects one JSON value per line; use it only on line-delimited input.
The output is on one line
Pretty-print is off. Turn it on and choose an indent size to get a formatted array.
A record spans several lines
In JSONL each record must sit on a single line. Minify any multi-line records first so each occupies one line.
Frequently Asked Questions
How do I convert JSONL to JSON for free?
Paste your JSON Lines above and a single JSON array appears instantly. Copy it or download a .json file — free, no signup.
What is JSONL?
JSONL — also called NDJSON — is a format where each line is a complete JSON object. This tool wraps those lines into one JSON array.
What if one line is invalid?
You get a clear error naming the exact line number and the parse problem, so you can fix just that line.
Does it preserve nested data?
Yes. Nested objects and arrays inside each line are kept exactly as they were in the combined array.
Can I pretty-print the output?
Yes. Turn on pretty-print and choose 2 or 4 space indentation, or leave it off for compact JSON.
Are blank lines a problem?
No. Empty lines and stray whitespace between records are skipped automatically.
How is JSONL different from a JSON array?
JSONL puts one standalone object per line; a JSON array wraps everything in brackets with commas. This tool converts the former into the latter.
Is there a size limit?
It comfortably combines many thousands of lines into one array, all within your browser.
Does the order stay the same?
Yes. Records appear in the array in the same order as the lines in your input.
Is my data sent to a server?
No. Everything happens inside your browser, so your data never leaves your device.
Can I download the result?
Yes. Save the output as a .json file, or copy it straight to your clipboard.
Can I convert JSON back to JSONL?
Yes — use our JSON to JSONL converter to split an array back into one object per line.
Does it handle Unicode?
Yes. Any Unicode characters in your data are preserved in the JSON output.
Does it work on phones?
Yes, in any modern browser on Windows, Mac, Android or iPhone with nothing to install.
Is this converter really free?
Completely free, forever — no account, no ads and no premium wall.
100% free · No signup · Processed in your browser · Data never sent
Last updated: August 2026 · FlipMyFormat JSONL to JSON Converter
Written and maintained by the FlipMyFormat team · Runs entirely in your browser