JSONL Viewer and NDJSON Parser
Paste JSON Lines text or open a .jsonl, .ndjson, .json or .txt file. Each line is parsed on its own, shown pretty-printed with its line number, and flagged if it is not valid JSON.
Related Developer Tools
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
How lines are parsed
What Counts as One Record
The text is split on line breaks. Each line is trimmed and passed to JSON.parse. Blank lines are skipped, but line numbers still match your file, so "L12" is line 12 in your editor. Windows line endings work because the trailing carriage return is trimmed. Any JSON value is accepted on a line, including arrays, strings and numbers, not only objects.
Reading the Errors
An invalid line is shown in red with the message from the browser's JSON parser. The wording differs between browsers. Common causes:
- A pretty-printed object spread over several lines. JSONL needs each record on a single line, so every line of that object fails on its own.
- A trailing comma after the last field, or commas between lines copied from a JSON array.
- Single quotes or unquoted keys, which are JavaScript syntax but not JSON.
- A truncated last line from a log that was cut off while it was being written.
Exporting Valid Records
"Download JSON array" writes every valid record, in file order, into records.json as one JSON array indented with 2 spaces. Invalid lines are left out without a note, so compare the valid count with the total before you rely on the export.
The file is read whole into memory, and every record is drawn on the page. Files with many thousands of lines can make the page slow.
JSONL Viewer Questions
Is JSONL the same as NDJSON?
For practical purposes, yes. Both mean one JSON value per line, separated by newlines, and this viewer parses them the same way.
Can I open a normal JSON file?
Yes, but a pretty-printed JSON file spans many lines, so each line is parsed separately and most will fail. A minified JSON file on a single line parses as one record.
Related Tools
- JSON to CSV Converter: paste the downloaded records.json to get a spreadsheet.
- JSONPath Evaluator: query the exported array, for example to find records with a given field value.