NDJSON / JSONL (JSON Lines) explained

TL;DR: NDJSON/JSONL is “one JSON value per line”. It’s great for streaming logs and big exports. Convert NDJSON ⇄ JSON array locally (no upload).

If you have a .ndjson or .jsonl file and a tool expects a normal JSON array ([...]), you need a simple conversion. This guide explains the format, the common parsing errors, and the safest workflow.

What is NDJSON / JSONL?

NDJSON (Newline Delimited JSON) and JSONL (JSON Lines) are the same idea: each line is a complete, standalone JSON value. Most often, each line is a JSON object:

{"id":1,"event":"signup"}
{"id":2,"event":"purchase"}
{"id":3,"event":"logout"}

Because lines are independent, systems can append new events without rewriting a giant file. That’s why NDJSON is common for logs, analytics exports, and data pipelines.

NDJSON vs a JSON array

A regular JSON array wraps everything in [ and ] and separates items with commas:

[
  {"id":1,"event":"signup"},
  {"id":2,"event":"purchase"},
  {"id":3,"event":"logout"}
]

NDJSON is usually easier to stream and process line-by-line. A JSON array is usually easier to load in typical “parse everything” APIs.

Common NDJSON/JSONL pitfalls

  • Each non-empty line must be valid JSON. Trailing commas and comments are not allowed.
  • Empty lines exist in real files. Most readers ignore them; some strict parsers don’t.
  • Log prefixes break parsing. Example: timestamps before {...}.
  • Newlines inside strings must be escaped. A literal line break inside a string makes the line invalid.

How to convert NDJSON to JSON (array)

  1. Open the no-upload converter.
  2. Paste NDJSON/JSONL (or a JSON array).
  3. Click NDJSON → JSON to produce a JSON array.
  4. If you see a “Line N is not valid JSON” error, inspect that line for stray characters.

How to convert JSON (array) to NDJSON

If you have a JSON array of objects and you need one item per line (for ingestion tools or streaming), click JSON → NDJSON. Each array element becomes its own line.

FAQ

Are NDJSON and JSONL different? In practice, they’re interchangeable names for the same “JSON per line” format. You’ll see both .ndjson and .jsonl extensions.

Can each line be an array or a string? Yes. Each line can be any valid JSON value, but objects are the most common.

Try the no-upload NDJSON/JSONL Converter
Privacy & Security
All processing happens locally in your browser. Files are never uploaded.

Next pages to check

Closest crawled pages without impressions yet. Added to speed first-impression conversion.

neighbor csharp csharp stj could not be converted system double createdat workflows webhneighbor csharp csharp stj could not be converted system int32 items 0 id checklists ananeighbor csharp csharp stj could not be converted system int32 items 0 id checklists edgneighbor csharp csharp stj could not be converted system int32 items 0 id workflows enteneighbor csharp csharp stj could not be converted system int32 user id checklists analytneighbor csharp go json cannot unmarshal bool into field user id type int troubleshootinneighbor csharp csharp newtonsoft additional text after finished reading json content p neighbor csharp csharp newtonsoft error converting 123 45 system decimal items 0 id trouneighbor csharp csharp newtonsoft error converting 123 45 system guid items 0 id workfloneighbor csharp csharp newtonsoft error converting 123 45 system guid items 0 id workfloneighbor csharp csharp newtonsoft error converting 123 system decimal items 0 id workfloneighbor csharp csharp newtonsoft error converting 123 system guid user id runbooks analneighbor csharp csharp newtonsoft error converting 123 system guid user id workflows ananeighbor csharp csharp newtonsoft error converting 123 system guid user id workflows apineighbor csharp csharp newtonsoft error converting 123 system guid user id workflows webneighbor csharp csharp newtonsoft error converting 123 system int32 user id workflows apneighbor csharp csharp newtonsoft error converting 123 system int32 user id workflows daneighbor csharp csharp newtonsoft error converting 123 system int32 user id workflows we

Quick fix checklist

  • Reproduce the error on a minimal input.
  • Check type/format and field mapping.
  • Apply the smallest safe fix.
  • Validate on production-like payload.