← Hashito System Home 日本語 Tools Blog
Convert
What is supported
Converts between one-JSON-per-line (JSONL / NDJSON) and a JSON array in both directions. Lines may hold objects, numbers, strings, arrays or null. In the JSON to JSONL direction a non-array value is emitted as a single line. Record order is preserved and blank lines are skipped.

About converting between JSONL and JSON

How to use

Paste JSONL (one JSON value per line) on the left and press "JSONL → JSON" to get a JSON array on the right. Paste a JSON array on the right and press "JSON → JSONL" to get one record per line on the left. This is useful for BigQuery load files, one-record-per-line logs, and machine learning datasets that you want to inspect as a single JSON array.

Why each record must fit on one line

JSONL guarantees only one thing: a line break ends a record. If a record spans several lines that guarantee breaks and a reader can no longer count records. That is why this tool never pretty-prints in the JSON to JSONL direction. In the other direction the records are already collected into an array, so indentation is free to choose.

Blank lines and broken lines

Blank lines are skipped and are not counted as records. After each conversion the tool reports how many records were read, how many blank lines were skipped, and how many input lines there were, so you can check the count against what you expected. If a line cannot be parsed, the tool reports its line number and stops instead of returning a partial result that would hide the gap.

Frequently Asked Questions

Are JSONL and NDJSON different formats?

They are two names commonly used for the same format. In both, each line holds exactly one JSON value and the line break is the record separator, so a record never contains a raw newline. Both the .jsonl and .ndjson extensions are in use. This tool treats input under either name the same way.

What happens if one line is broken?

The tool reports which line number could not be parsed and does not convert. Because each line is one record in JSONL, the damage is usually limited to that single line. Fix the reported line and convert again. Blank lines are not errors; they are skipped and counted separately.

Is my data sent to a server?

No. The conversion runs entirely in JavaScript in your browser. The JSONL or JSON you paste is never sent to or stored on a server.