Line-specific validation
Find the exact source line containing invalid JSON instead of receiving one generic document error.
Start typing to search 227 tools.
Validate and normalize JSON Lines or JSONL data as one compact JSON value per line, with strict blank-record detection and an optional final newline.
Each non-empty line is valid JSON.
JSON Lines Formatter checks newline-delimited JSON one record at a time. Each physical line must contain one complete valid JSON value. Objects and arrays are common, but strings, numbers, booleans, and null are valid records too. The output normalizes every record to compact JSON so it remains one value per line.
A blank line is not a JSON value, so strict mode reports it with its source line number. The optional cleanup setting can intentionally remove blank lines from imported logs or hand-edited files. A single trailing line terminator is accepted and can be included in the output.
Focused controls, predictable output, and a workflow designed around this exact transformation.
Find the exact source line containing invalid JSON instead of receiving one generic document error.
Keep each JSON value independent rather than wrapping all records in a large array.
Remove formatting whitespace inside each record while preserving one-record-per-line structure.
Catch invisible empty records unless cleanup is explicitly selected.
Practical details about input, output, privacy, limits, and the best way to use this tool.
JSON Lines is a UTF-8 text format containing one valid JSON value on each line. It is commonly saved as .jsonl and is also called newline-delimited JSON.
Usually no. The complete file is a sequence of separate JSON values, so a normal parser expecting one object or array cannot parse the whole file at once.
No. An object, array, string, number, boolean, or null can be a record as long as the entire line is one valid JSON value.
No. A blank line is not a JSON value. Trexmi rejects it by default and offers an explicit cleanup option for non-standard input.
No. Pretty-printed multiline objects break the one-value-per-line rule. Use compact JSON for each record.
A final line terminator is strongly recommended because it makes concatenation and command-line processing easier. The formatter can add or omit it.
No. It validates JSON syntax per line. Different records may have different fields and types unless another schema-validation step enforces consistency.
No. The browser and server apply input-size limits. Production streaming pipelines should parse incrementally instead of loading an unlimited file into one request.
Learn JSON objects, arrays, value types, validation, formatting, parsing, API workflows, and common syntax errors.
Whitespace inside each object is normalized while the two independent records remain separate.
{"id":1, "active":true}
{"id":2, "active":false}
{"id":1,"active":true}
{"id":2,"active":false}
JSON Lines permits any complete JSON value, not only objects.
null 42 "ready" [1,2,3]
null 42 "ready" [1,2,3]
A trailing comma makes the second record invalid and the original line number is reported.
{"id":1}
{"id":2,}
{"id":3}
Error: Invalid JSON on line 2: Syntax error
Strict mode treats an empty physical line as invalid; cleanup can remove it intentionally.
{"id":1}
{"id":2}
Error: Blank JSON Lines record on line 2.
JSON Lines has three core expectations: UTF-8 text, one valid JSON value per line, and a line terminator between records. A final newline is recommended. The formatter normalizes CRLF or CR line endings to LF and emits each parsed value in compact JSON form.
Do not paste a comma between records and do not wrap the records in an outer array. If the source is one ordinary JSON document, inspect it with JSON Formatter instead.
Strict mode reports the first blank record or invalid JSON record with its original line number. A final newline is not treated as an extra blank record. The cleanup checkbox is intentionally opt-in because silently skipping an empty record can conceal a broken exporter.
Use JSON Validator when debugging one ordinary JSON value. For JSONL, fix the reported line in its original file so later line numbers remain meaningful.
JSONL works well for application logs, model-training examples, event streams, bulk API imports, and command-line pipelines because a consumer can process one record without loading an outer array. Lines can also be appended or concatenated when each producer follows the same encoding and newline rules.
For tabular exports, verify that records share compatible fields before sending them to JSON to CSV. For deeply nested individual records, JSON Flatten can expose their paths.
The formatter does not validate a shared schema, sort records, remove duplicates, merge multiline stack traces, or stream an unlimited file. JSON numbers are subject to the numeric range and precision of the server parser. A byte-order mark, invalid UTF-8, or literal unescaped line break inside a JSON string can make a record invalid.
Read the JSON Lines format documentation for the line rules and JSON RFC 8259 for the grammar of each value.