How the JSONL Validator & Formatter Works
Use this tool to check JSON Lines (JSONL/NDJSON) one line at a time. Each nonblank line is parsed independently with JSON.parse. Valid values are classified as object, array, or scalar; invalid lines are reported separately, and processing continues. The tool does not wrap the records in an outer JSON array.
Review the Record Summary and Issues
The record summary shows lines read, valid records, invalid records, blank lines, and counts for object, array, and scalar records. For an invalid value, the issues table shows its line, column, parser message, and original content.
The invalid-record count includes all invalid records, but the visible table displays at most 1,000 rows. Each displayed original-content cell is limited to 200 characters. Export issues (CSV) includes all invalid records and the full raw field.
Choose Compact or Indented Output
Valid parsed values are re-serialized with JSON.stringify. Compact puts one serialized JSON value on each physical line. Indented - 2 spaces (review output), Indented - 4 spaces (review output), and Indented - tab (review output) spread each record over multiple lines and separate records with a blank line, so they are for review rather than one-record-per-line JSONL re-ingestion.
Parsed values and record order are preserved, but textual formatting and representation can change during serialization. Select LF (Unix / Mac), CRLF (Windows), or CR (legacy Mac) for line endings. The Output encoding control offers UTF-8 and UTF-8 with BOM; currently, the BOM option is an implementation limitation because the export code prefixes literal text instead of a valid BOM byte sequence.
Preview, Copy, and Export Results
Processing finishes before the preview is displayed. It shows up to 500 valid records. Copy valid JSONL and Export valid JSONL use the selected format and line endings and include the full valid-record output. Invalid records are excluded because they have no parsed value to serialize. With an indented setting, these controls still use their interface labels, but the output is review-formatted rather than one-record-per-line JSONL.
How to Use the JSONL Validator & Formatter
- Paste data into Paste JSONL/NDJSON content below, or drop a JSONL, NDJSON, or TXT file in the upload area and use browse files.
- Choose Output format, Output line endings, and Output encoding.
- Processing starts automatically when the source or an output setting changes.
- Review the summary and issues table. Use Copy valid JSONL or Export valid JSONL for valid output, and Export issues (CSV) for the invalid-record report.
What the Tool Does Not Change or Clean
This tool reports malformed and blank lines; it does not repair malformed JSON, trim values, deduplicate records, or remove entries from the report. It does not convert JSONL into a single JSON array. Only valid parsed values are included in formatted output. For cleanup tasks, use JSONL Cleaner.
Processing and Display Limitations
A loaded file longer than 200,000 characters is shortened in the input box, while the full content is processed. The preview is capped at 500 valid records, and the visible issue table at 1,000 rows. Original content in that table is truncated to 200 characters. A final newline contributes one trailing empty split element that the parser removes, so the displayed line count is not an unconditional count of every physical newline. No general maximum input size is confirmed here.
Privacy Scope
Uploaded files are read with browser JavaScript, parsing uses JSON.parse, and downloads are created with browser Blob objects. These facts describe this tool's file-processing path; they do not establish a site-wide privacy or analytics guarantee.
Frequently Asked Questions
How is this different from JSONL Cleaner?
This tool validates and serializes parsed values. It does not repair, trim, deduplicate, or remove lines from the report. Use JSONL Cleaner when you need those cleanup actions.
Does this tool convert my JSONL file into a JSON array?
No. Each line stays an independent JSON value in a line-delimited stream. The tool never wraps records in an outer array or otherwise changes the record-stream structure of the file.
What happens to lines that fail to parse?
They are included in the issue count, and processing continues. The visible table shows up to 1,000 issues with original content shortened to 200 characters; Export issues (CSV) includes all invalid records and the full raw field. Invalid records are excluded from formatted valid output because there is no parsed value to serialize.
What does indented output mean for a line-delimited format?
Compact output keeps one serialized JSON value per physical line, so choose it when the output must remain re-ingestable JSONL/NDJSON. Indented output uses multiple lines per record with a blank line between records, so it is review-formatted rather than a one-record-per-line stream.