JSON Lines to JSON
Combine a file with one JSON value per line into a single, neatly indented JSON list. Bad lines are pinpointed. Your data is processed in your browser only.
- No account needed
- Nothing uploaded
- Skips blank lines
- Errors name the line
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
JSON Lines to JSON in three steps
No account, no email, no waiting for an upload.
- STEP 01
Paste or open your JSONL
Add text or open a .jsonl, .ndjson, .json or .txt file.
- STEP 02
Choose an indent
Pick 2 spaces, 4 spaces or tabs for the output.
- STEP 03
Copy the JSON array
All lines are collected into one list, and the note shows how many lines were read.
What JSON Lines to JSON does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
What you get
- Line-accurate errorsIf a line is not valid JSON, the message gives its line number and the column.
- Blank lines ignoredEmpty lines, including a trailing one, do not cause errors.
- Any value per lineObjects, arrays, strings, numbers and booleans can all appear as lines.
- Order preservedRecords appear in the array in the same order as in the file.
- Windows line endings fineFiles saved with CRLF are read correctly.
Good to know
- One value per lineA record spread across several lines, as in pretty-printed JSON, is not valid JSON Lines. Format such data with the JSON formatter.
- MemoryHuge files become one big array in memory. Split very large inputs before converting.
- No merging of fieldsRecords are copied as they are. Use JSON to CSV if you want columns.
Your data never leave your device
The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.
Typical online tool upload
Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.
Mediaextractr no upload
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
When people use JSON Lines to JSON
Open a log export
Turn line-oriented logs into a single document you can inspect.
Prepare a dataset
Convert a .jsonl dataset for tools that only accept arrays.
Check a pipeline's output
Collect lines and then explore them with the JSON tree viewer.
Share a sample
Wrap a few lines into a list that other people can paste into a formatter.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
What JSON Lines looks like
Each line is a complete JSON value, most often an object. Lines are separated by a line break, and there are no commas between them, no outer brackets and no indentation.
That is why the format suits logs and streams: you can add a record without rewriting the file. It also means a plain JSON parser cannot read the file in one go, which is where this tool helps.
When a line is rejected
A message such as 'Line 12 is not valid JSON' means the parser stopped on that line. The usual causes:
- A record broken across several lines.
- A trailing comma or single quotes.
- A truncated last line, for example from an interrupted download.
- A text header or footer added around the data.
Next steps
Turn the array into a spreadsheet with JSON to CSV, or go back with JSON to JSON Lines.
Questions, answered
How do I convert JSONL to a JSON array?
Paste the lines. They are parsed one by one and returned as a single list.
Is it safe to paste production log lines here?
Yes. The lines are parsed in your own browser and are not uploaded or stored.
What if one line is broken?
The tool stops and tells you the line number and column, so you can fix or remove it.
Are blank lines allowed?
Yes, blank lines are skipped without an error.
Can I use .ndjson files?
Yes. NDJSON and JSON Lines are the same layout.
Will it work on my tablet?
Yes, current mobile browsers run it. Files open from the device's file picker or can be pasted.