JSONL to JSON Converter Online — Free
Convert JSONL (JSON Lines / NDJSON) into a formatted JSON array, with the exact line number reported for any record that fails to parse.
Frequently Asked Questions
How are blank lines handled?
They are skipped. A trailing newline at the end of a file is normal and does not produce an empty record.
What happens if one line is malformed?
Conversion stops and reports the exact line number along with the parser error, so you can jump straight to the broken record instead of hunting through the file.
Can I use this to inspect a fine-tuning dataset?
Yes — converting to a formatted array is the quickest way to read a JSONL file. To check it against the fine-tune chat schema as well, use the JSONL Validator.
Is NDJSON the same thing as JSONL?
In practice yes. NDJSON (Newline Delimited JSON) and JSON Lines describe the same one-object-per-line layout, and files using either name convert identically here.
Privacy First: All processing happens directly in your browser. Your data never leaves your device.
About JSONL → JSON
Reading a JSONL file is awkward precisely because of what makes it good for machines: no wrapping array, no indentation, one long line per record. Converting to a formatted JSON array is the fastest way to actually look at your data.
What the conversion does
Each non-blank line is parsed independently and collected into a single array, which is then formatted with your chosen indentation. Blank lines are skipped rather than becoming null entries — a trailing newline at the end of a file is normal and should not produce a phantom record.
Because every line is parsed on its own, a malformed record can be reported precisely. Rather than a single unhelpful failure for the whole file, you get the line number and the parser message, which is usually enough to identify the offending record immediately.
Where JSONL files come from, and how they break
- A file concatenated from several exports may contain a stray blank line or a partial final record if a writer was interrupted mid-line.
- A record written with pretty-printed JSON spans multiple lines and will fail to parse, because each line is only a fragment of an object.
- Windows line endings are handled, but a file with no trailing newline can lose its last record in tools that split naively.
- A JSON array accidentally saved with a .jsonl extension parses as one record on line 1 rather than as many — a common and confusing mix-up.
Watch the memory
JSONL exists so that huge datasets need never be held in memory at once, and converting to an array undoes exactly that. For inspecting a sample this is fine and convenient. For a multi-gigabyte training file it is not — take a slice of the first few hundred lines instead, which is usually all you need to check the shape.