Convert JSON ⇄ JSONL / NDJSON
0 bytes uploadedConvert JSON arrays into validated single-line JSONL records for streaming & batch AI APIs—or unpack JSONL back to JSON.
or drop a text or data file here · Ctrl V to paste · or drop .json, .jsonl, or .ndjson · Ctrl V to paste
- 100% browser-local
- Bidirectional JSON ⇄ JSONL
- Per-line JSON validation
Instant Before & After Preview
[
{ "event": "page_view", "path": "/docs", "ms": 18 },
{ "event": "export_csv", "rows": 420, "ms": 6 },
{ "event": "copy_toon", "savedPct": 51, "ms": 2 }
]{"event":"page_view","path":"/docs","ms":18}
{"event":"export_csv","rows":420,"ms":6}
{"event":"copy_toon","savedPct":51,"ms":2}Source vs. target format specification comparison: JSON → JSONL / NDJSON
| Property | Source: JSON | Target: JSONL / NDJSON |
|---|---|---|
| Structure type | Hierarchical | Hierarchical |
| Human readability | High | Medium |
| Nesting support | Yes | Yes |
| LLM token efficiency | Low | Medium |
| File extension | .json | .jsonl |
| MIME type | application/json | application/x-ndjson |
| Best for | REST/GraphQL APIs, structured application state, NoSQL documents, and machine-to-machine data exchange. | OpenAI/Anthropic/Gemini fine-tuning datasets, batch inference jobs, log ingestion, and streaming ETL. |
How it works
How to convert between JSON and JSONL locally
Extract nested arrays into NDJSON lines or combine NDJSON logs back into formatted JSON.
- Paste JSON or JSONLProvide a JSON array, nested JSON object, or .jsonl/.ndjson log file.
- Set direction & array pathKeep $ for root arrays or set $.data.records to extract a nested array; switch direction for JSONL -> JSON.
- Download validated outputVerify every line parses cleanly and export .jsonl or .json locally.
FAQ
Frequently asked questions
How do I extract an array nested inside an API wrapper object?
Enter the dot path inside Array JSON Path (for example $.results or $.data.items) to emit each item on its own JSONL line.
Can I convert NDJSON logs back into a standard JSON array?
Yes. Set Direction to JSONL -> JSON to parse every non-empty line into one formatted JSON array.
What does Validate Every JSONL Line catch?
It validates every line individually so trailing commas, blank lines, or truncated records report exact line numbers immediately.