NDJSON validation and quarantine
Validate pasted or imported NDJSON line by line; download valid records and a report with every rejected original line.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Paste NDJSON or choose one UTF-8 .ndjson/.jsonl/.txt file. Each nonblank line is one complete JSON value. Review accepted, rejected and blank counts, then download the two outputs separately.
How to use this tool
- Choose Paste NDJSON or Choose NDJSON file. The selected source alone is processed.
- Validate one JSON value per line; inspect accepted, rejected and blank counts and the first 20 rejected originals.
- Download valid.ndjson and rejected.json separately. Repair rejected originals before treating the accepted file as complete.
Supported inputs and limits
Pasted text is limited to 1 MiB; one UTF-8 file is limited to 10 MiB and 50,000 lines. A final newline ends the last record and is not counted as a blank line.
Invalid lines keep their original text and line number in rejected.json. Empty lines are counted separately. The tool does not repair broken or split log records.
Large streaming logs such as 2 GB journald exports exceed this browser workspace; use a streaming command-line workflow for those.
Worked example
Example input
{"id":1}
not-json
{"id":9007199254740993}Example options
{}Example output
{
"validRecords": 2,
"rejectedRecords": 1,
"blankLines": 0,
"rejected": [
{
"line": 2,
"source": "not-json"
}
]
}When something does not work
Rejected lines keep their original text and line number. Review rejected.json, repair the source, then validate again; do not treat valid.ndjson as a complete copy while rejections remain.
Frequently asked questions
Will one bad line discard good records?
No. Valid records retain their original order in valid.ndjson. rejected.json lists every invalid original line and its 1-based line number.
Does a final newline count as a blank line?
No. LF and CRLF terminate records; an additional empty line is counted separately. A lone CR inside a record is rejected.
Can this process a multi-gigabyte log?
No. The local browser workspace accepts one UTF-8 file up to 10 MiB and 50,000 lines. The cited 2 GB journald workflow needs streaming tools.