{ }jsonkit
Tools/Convert/JSON ⇄ JSONL
Search tools…⌘K
Format
{ }JSON Formatter
≡→JSON Minifier
\"JSON Escape / Unescape
a→zJSON Sorter
⇄{}JSON Flattener
Validate
JSON Validator
±JSON Diff / Compare
§JSON Schema Generator
JWT Decoder
ΔJSON Patch / Merge Patch
kbJSON Size Analyzer
Convert
→csvJSON to CSV
csv→CSV to JSON
⇄ymlJSON ⇄ YAML
⇄xmlJSON ⇄ XML
→tsJSON to TypeScript
b64Base64 Encode / Decode
%2FURL Encode / Decode
clkTimestamp Converter
→zJSON to Zod
→pyJSON to Pydantic
→goJSON to Go
→javaJSON to Java
⇄jsonlJSON ⇄ JSONL
5→JSON5 / JSONC to JSON
Query
$.JSONPath / JQ Tester
.*Regex Tester
Generate
Mock JSON Data Generator
idUUID / NanoID Generator
#Hash Generator
⇄jsonl

JSON ⇄ JSONL Converter

Array to newline-delimited JSON and back.
processes as you type · client-side
Sample
Upload
⇄ JSON → JSONL
⧉ Copy output ⌘C
Download
Share
Clear
JSON273 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
JSONL
1 2
{"id":"usr_8x42","name":"Ada Lovelace","email":"ada@example.com","roles":["admin","editor"]} {"id":"usr_9k11","name":"Grace Hopper","email":"grace@example.com","roles":["editor"]}
✓ valid (RFC 8259)273 B → 179 B0.0 msLn 1, Col 1UTF-8

About JSON ⇄ JSONL

The JSON to JSONL converter turns a JSON array into JSONL — also called NDJSON or newline-delimited JSON — where every element becomes its own minified JSON document on a single line. Flip the direction to parse a JSONL file back into a clean, pretty-printed JSON array.

Everything runs entirely in your browser with no upload, so datasets, training examples and records that may hold personal or proprietary data never leave your machine. It is free, needs no account and has no size limits.

It is built for the people who live in this format: engineers preparing OpenAI or other LLM fine-tuning files, data teams streaming records into BigQuery or Elasticsearch, and anyone who has a JSON array on one side and a line-per-record pipeline on the other.

How it works

JSON to JSONL

Paste a JSON array and each element is emitted as one minified JSON document per line. A single non-array value (an object, string or number) simply becomes one line, so the tool works whether you have a full array or a single record.

JSONL to JSON

Flip the direction with the swap control and paste JSONL. Every non-empty line is parsed as an independent JSON document and the results are collected into a pretty-printed JSON array with two-space indentation.

Blank lines and formatting

Blank or whitespace-only lines are skipped when reading JSONL, so trailing newlines and spacing between records do not break the conversion. Each output line is compact JSON with no internal newlines, which is exactly what JSONL consumers expect.

Line-precise errors

If a line is not valid JSON, the converter stops and tells you the exact line number and the parse error instead of failing silently, so you can jump straight to the malformed record in a large file.

Frequently asked questions

What is JSONL / NDJSON?

JSONL (JSON Lines), also called NDJSON (newline-delimited JSON), is a format where each line is a complete, independent JSON document. It is used for logs, data streaming and machine-learning datasets because a program can read and process one record at a time without loading the whole file.

How do I convert JSON to JSONL for OpenAI fine-tuning?

Paste your JSON array of training examples — each an object with a messages array — and the converter outputs one example per line, which is the JSONL layout OpenAI fine-tuning expects. Copy the result into your .jsonl file. The conversion is client-side, so your training data is never uploaded.

What is the difference between JSONL and JSON?

A JSON file is a single document, usually one array or object that must be parsed as a whole. JSONL is many separate JSON documents, one per line, with no enclosing array and no commas between records — which makes it streamable and append-friendly. This tool converts between the two in either direction.

Is my data uploaded when I convert it?

No. The conversion runs entirely in your browser, so arrays, records and fine-tuning datasets never leave your machine and nothing is sent to a server.

What happens to blank lines and invalid lines in my JSONL?

Blank and whitespace-only lines are skipped automatically. If a line contains invalid JSON, the converter reports the exact line number and the parse error so you can fix that record.