Convert JSON ⇄ JSONL / NDJSON

0 bytes uploaded

Convert JSON arrays into validated single-line JSONL records for streaming & batch AI APIs—or unpack JSONL back to JSON.

100% Client-Side — Verify 0 bytes uploaded in Network tabVerify 0 bytes sent in Network tab

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

Before (Input)events.json
[
  { "event": "page_view", "path": "/docs", "ms": 18 },
  { "event": "export_csv", "rows": 420, "ms": 6 },
  { "event": "copy_toon", "savedPct": 51, "ms": 2 }
]
After (Output).jsonl
{"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

PropertySource: JSONTarget: JSONL / NDJSON
Structure typeHierarchicalHierarchical
Human readabilityHighMedium
Nesting supportYesYes
LLM token efficiencyLowMedium
File extension.json.jsonl
MIME typeapplication/jsonapplication/x-ndjson
Best forREST/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.

  1. Paste JSON or JSONLProvide a JSON array, nested JSON object, or .jsonl/.ndjson log file.
  2. Set direction & array pathKeep $ for root arrays or set $.data.records to extract a nested array; switch direction for JSONL -> JSON.
  3. 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.