What makes NDJSON valid?
Each non-blank line must be a complete, parseable JSON value — almost always an object. Lines are independent: a syntactically broken line does not invalidate the rest of the file. The line separator must be \n (LF) or \r\n (CRLF). Trailing whitespace inside a line is fine; trailing commas at the end of a line are not (that’s not valid JSON).
Are blank lines OK?
The original NDJSON spec says no — every line should contain a JSON value. In practice, almost all real-world tools (jq, Pino, BigQuery, MongoDB) tolerate blank lines and skip them. The validator counts blank lines separately and does not flag them as errors, so you can validate real-world files without false positives.
What is the practical max line size?
NDJSON itself imposes no limit, but consumers do. Many libraries default to 64KB or 1MB per line. BigQuery rejects lines over 100MB. For broad compatibility, keep records under 1MB per line — and if you need bigger payloads, store them as files referenced by URL rather than inlined.
NDJSON, JSONL, JSON Lines — same thing?
Effectively yes. NDJSON (newline-delimited JSON), JSONL, and JSON Lines all refer to the same format: one JSON value per line, separated by newlines. The validator treats them interchangeably. Minor spec differences exist (JSON Lines technically requires UTF-8; NDJSON allows BOMs in some interpretations) but they don’t affect typical use.
Why does my file fail validation?
The most common causes: (1) trailing comma at the end of an object (valid JSON5, invalid JSON), (2) single-quoted strings (Python-style, invalid JSON), (3) NaN, Infinity, or undefined (not valid JSON literals), (4) a JSON array spread across multiple lines — NDJSON requires the whole value on one line, (5) an unescaped newline inside a string.
Can it validate millions of lines?
The validator runs synchronously and reports every line. Browsers handle ~100k lines comfortably; beyond that the UI may stutter while rendering. For very large files, validate a representative sample — if the sample is clean and your producer is consistent, the rest is almost always fine.
Are duplicate keys flagged?
No — JSON.parse silently accepts duplicate keys (later wins), and so does NDJSON. If you need duplicate-key detection, run the lines through a stricter parser. The validator focuses on syntax-level validity.
Is my NDJSON sent to a server?
No. Validation runs entirely in JavaScript inside your browser — no upload, no telemetry. Open DevTools → Network and confirm. Log files often contain user IDs, IPs, and proprietary event data, so this matters in real-world use.