JSON to JSONL

Convert between JSON arrays and newline-delimited JSON (JSON Lines / NDJSON)

How to use

  1. Paste JSON to convert to JSONL, or paste JSONL to convert back to a JSON array — direction is auto-detected.
  2. Invalid JSONL lines are reported with their line numbers instead of failing silently.
  3. Copy the result or download it as a file.

About this tool

JSONL has become the lingua franca of ML datasets and structured logs, yet most editors handle it poorly. This converter flips between the two encodings while validating every line, so a single bad record is pinpointed by line number instead of poisoning a whole pipeline import.

Frequently asked questions

What is JSONL (JSON Lines)?

JSONL is a text format where each line is one independent JSON value, usually an object. It is the standard for streaming datasets, log files, and ML training data (e.g. OpenAI fine-tuning files are .jsonl).

JSON vs JSONL — when do I need which?

Use plain JSON arrays when the whole document is read at once. Use JSONL when records arrive as a stream, when you process line-by-line, or when the file is too big to hold in memory as a single array.

What about .ndjson files?

NDJSON (newline-delimited JSON) is the same format with a different name. This tool treats them identically.

Is my data uploaded anywhere?

No. Parsing happens in your browser only.

Related tools