NDJSON Validator
NDJSON validator. Line-by-line syntax check of an NDJSON (Newline-Delimited JSON) file. Shows the exact line number and parse error for every bad row. Up to 1 GB, runs in your browser. NDJSON and JSONL are the same format — this validator is just branded for the NDJSON name.
100% client-side. Your data never leaves this page — no upload, no server.
Validate
NDJSON Validator
Paste or drop an NDJSON / JSONL file. Each line is parsed independently; every bad line reports its line number and the exact JSON parser error. The "valid lines only" download lets you salvage the good data when a few rows are corrupt.
Before you start
You need an NDJSON file (also called JSONL, JSON Lines, or LDJSON — see NDJSON vs JSONL), or just some raw text you want to verify. NDJSON expects each line to be its own self-contained JSON value, with no enclosing array. This tool handles the "dirty" reality of log exports, observability dumps, and AI datasets where one broken character can ruin a whole pipeline.
The validator runs entirely in your browser. Files up to 100 MB usually validate in a few seconds on a modern machine. For multi-gigabyte logs, your browser's RAM is the bottleneck — split into chunks first.
How to use it
- Paste your text into the input box or drag a
.ndjsonfile directly onto the drop zone. - Click Validate to start the line-by-line syntax check.
- Review the error list — line number and the exact
JSON.parseerror message for every failure. - If you just want to salvage the good rows, click Download valid lines only to save a
clean.ndjsonfile with the broken rows stripped out. - Click Clear to reset for the next file.
What gets flagged
- Bare-word values.
{"status": ok}fails becauseokisn't a JSON value (must be"ok",true, or null). - Single quotes. JSON requires double quotes;
{'id':1}errors immediately. - Trailing commas.
{"id":1,}is illegal in strict JSON. - Unquoted keys.
{id:1}errors at position 1 — keys must be strings. - Comments. NDJSON inherits JSON's no-comment rule.
- Blank or whitespace-only lines. Strict NDJSON consumers reject them; this tool flags them so you can decide.
Tips & common pitfalls
- BOM at the start. Some Windows tools prefix files with
EF BB BF; many NDJSON parsers treat the BOM as part of the first record's first character, breaking it. The auto-fixer strips BOMs. - CRLF line endings. Tolerated by most parsers but not strictly NDJSON — normalize to LF for portability.
- Mixed shapes per line. Allowed by the spec, but most ingest pipelines assume a uniform schema. Stick to one shape.
- Pretty-printed JSON is not NDJSON. If your records are spread across multiple lines, the validator will flag every "continuation" line. Use the formatter to minify per record first.
Troubleshooting
"Unexpected token ]" but I don't see a bracket
JSON parser errors point at the position where the parser expected something different — usually it means a comma or a closing brace is missing earlier in the line. Look at the characters just before the reported position.
My browser tab freezes on a huge file
The validator processes the whole input at once. For files over 200 MB, use the file input rather than copy-paste — browsers stream files better than they handle giant text strings.
Related tools
Frequently asked questions
Is NDJSON the same as JSONL?
Yes, functionally identical. NDJSON ("Newline-Delimited JSON," promoted by ndjson.org) and JSONL ("JSON Lines," promoted by jsonlines.org) both mean "one JSON value per line, separated by \n." This validator works on either. See NDJSON vs JSONL for the naming history.
Does my data get uploaded?
No. Everything runs in your browser using JavaScript. The "upload" is a local file read; the "download" is a Blob URL. See the privacy policy.
Does this check schema, or just syntax?
Syntax only. For schema validation (required fields, types, OpenAI/Anthropic fine-tune conformance), use the JSON Schema validator or the per-vendor validators under "AI datasets" in the nav.
Is there a CLI version?
Yes. The jsonlkit CLI includes jsonlkit validate file.ndjson for large files that don't fit in browser memory. Same logic, MIT-licensed.