ZeroTool Workbench
JSONL Converter
Convert JSONL and NDJSON to JSON arrays, convert JSON arrays back to JSON Lines, validate each line, and export valid records in your browser.
How to Use
- Paste JSONL / NDJSON into the left panel, or open a local
.jsonl,.ndjson,.json, or.txtfile. - Click Validate to check each line and see exact line numbers for parse errors.
- Click JSONL → JSON to build a JSON array from the valid records.
- Paste a JSON array into the right panel and click JSON → JSONL to create compact JSON Lines output.
- Use Download .json or Download .jsonl to save the converted result.
Worked Example
Input JSONL:
{"id":1,"event":"signup","user":"alice"}
{"id":2,"event":"purchase","user":"bob","amount":29.99}
Output JSON array:
[
{
"id": 1,
"event": "signup",
"user": "alice"
},
{
"id": 2,
"event": "purchase",
"user": "bob",
"amount": 29.99
}
]
JSONL vs JSON Arrays
A JSON array wraps every record inside one large document. JSONL writes each record as a standalone JSON value on its own line. That line-oriented shape works well for logs, streaming exports, command-line processing, and large datasets where each record can be handled independently.
Validation Details
The validator parses every non-empty line with JSON.parse(). Successful lines are counted as valid records.
Failed lines appear in the issue panel with the line number, parser message, and a short preview of the original line.
FAQ
What is JSONL?
JSONL, also called JSON Lines or NDJSON, stores one complete JSON value per line. It is common in logs, data exports, streaming APIs, and AI datasets.
What JSON input can be converted to JSONL?
Paste a JSON array. Each array item becomes one compact JSONL line, preserving objects, arrays, strings, numbers, booleans, and null values.
How are empty lines handled?
Empty lines are ignored by default. Turn off the option to treat empty lines as line-level validation issues.
Can I export only valid JSONL records?
Yes. Enable Convert valid lines only, or use the .jsonl download action after validation to export the valid parsed lines.
Where is my data processed?
All parsing, validation, conversion, and file export run inside your browser with local JavaScript APIs.