Converter

JSONL ⇄ JSON

JSON Lines is how logs, exports and LLM fine-tuning datasets travel. Convert a .jsonl file into a proper JSON array to inspect it, or flatten an array back into one record per line — with bad lines reported by line number.

Input
Waiting for input.
Output

⌘/Ctrl + Enter runs it again. Everything happens in this browser — nothing is uploaded.

About the JSONL ⇄ JSON converter

JSON Lines is how logs, data exports and LLM fine-tuning datasets travel: one JSON document per line, appendable and streamable. It is also awkward to inspect, because no ordinary JSON tool will parse the file as a whole. This converts a .jsonl file into a proper array you can read, search and feed to the other tools here, and flattens an array back to one record per line.

How to use it

  1. Paste JSONL (one object per line) or a JSON array — the direction is detected.
  2. Invalid lines are named by line number; tick "Skip invalid lines" to ignore them and convert the rest.
  3. Copy or download the result as .json or .jsonl.

Questions

What is the difference between JSONL and NDJSON?

Practically none — both mean one JSON value per line, separated by newlines. The names are used interchangeably, and this tool reads and writes both.

One line in my export is corrupt. Can I still convert it?

Yes. By default it refuses and tells you which lines are bad; tick "Skip invalid lines" and it converts everything else, reporting how many it skipped.

Is this useful for OpenAI fine-tuning files?

Yes — those are JSONL. Convert to an array to inspect or edit the set, then convert back to JSONL for upload.