Xerobit

JSONL Viewer: Parse JSON Lines into a Readable Table

A JSONL viewer that parses JSON Lines (NDJSON) text and displays every record as a row in a table. Columns are built from the union of all keys found across the input, and nested objects or arrays are rendered as compact JSON strings. The tool runs entirely in your browser so nothing is uploaded to any server.

One JSON value per line.

Result

#	name	age	city
Line 1	Alice	30	
Line 2	Bob		NYC

Total lines: 2. Valid: 2. Invalid: 0.
#nameagecity
Line 1Alice30
Line 2BobNYC

Total lines: 2. Valid: 2. Invalid: 0.

How to use the jsonl viewer

  1. Paste your JSONL or NDJSON text into the input area, one JSON value per line.
  2. Set Max rows shown if you have a large file and only need a preview.
  3. The table appears instantly as you type, with columns for every key found across all records.
  4. Check the summary note below the table for total lines parsed, valid records, and any invalid line numbers.

How the JSONL viewer works

The viewer splits the input on newline characters and attempts to parse each line independently using standard JSON rules. Valid records are collected and their keys are merged into a single ordered set. This union of keys becomes the table header, ensuring every column is represented even if some records omit certain fields.

Nested objects and arrays are not expanded into sub-columns. Instead they are serialized back into compact JSON strings so the table stays readable. For example, a field containing {"city":"NYC","zip":"10001"} appears exactly like that in its cell rather than spawning extra columns.

Handling invalid lines

Real-world JSONL files often contain blank lines, trailing commas, or corrupted entries. Rather than failing on the first bad line, this viewer skips unparseable lines and reports them by number in the summary. Line numbering starts at 1, matching what you see in most text editors.

Empty lines are ignored silently and do not count toward the valid or invalid totals. If every non-empty line fails to parse, the tool shows an error instead of an empty table so you know something needs fixing.

Common uses for JSONL data

JSON Lines is the default export format for many log aggregators, machine learning datasets, and database dump tools. Each line being a self-contained JSON value makes it easy to append, stream, and process in parallel without loading an entire file into memory.

If you receive data in another tabular format, you can convert it first. For instance, use csv to jsonl to transform comma-separated files before viewing them here. When you need to move data out of JSONL and into spreadsheets, jsonl to csv handles that conversion directly.

Reference: JSONL vs NDJSON vs JSON array

FormatStructureStreaming friendly
JSONL / NDJSONOne JSON value per line, no outer wrapperYes
JSON array[{...}, {...}]No, requires full parse
CSVComma-separated rows with optional headerYes, but no native types

JSONL and NDJSON are the same format under different names. Both require exactly one complete JSON value per line separated by newline characters. A standard JSON array wraps everything in brackets, which prevents line-by-line streaming.

Tips for large files

Use the Max rows shown setting to limit the table size when working with thousands of records. The parser still reads every line to compute accurate valid and invalid counts, but only the first N records are rendered in the table. This keeps the page responsive while giving you full diagnostics.

For files with hundreds of unique keys, the table will be wide. Consider extracting just the columns you need first, or converting to a simpler format using tools like csv viewer after transforming the data.

Worked examples

ExampleInputResult
Simple recordsJSONL input: {"name":"Alice","age":30} / {"name":"Bob","city":"NYC"} / {"name":"Carol","age":25,"city":"LA"}; Max rows shown: 100# name age city / Line 1 Alice 30 / Line 2 Bob NYC / Line 3 Carol 25 LA / Total lines: 3. Valid: 3. Invalid: 0.
With an invalid lineJSONL input: {"id":1,"ok":true} / not valid json / {"id":2,"ok":false}; Max rows shown: 100# id ok / Line 1 1 true / Line 3 2 false / Total lines: 3. Valid: 2. Invalid: 1. Invalid lines: 2.
Nested objectsJSONL input: {"user":{"name":"Eve","role":"admin"},"active":true} / {"user":{"name":"Dan"},"tags":["a","b"]}; Max rows shown: 100# user active tags / Line 1 {"name":"Eve","role":"admin"} true / Line 2 {"name":"Dan"} ["a","b"] / Total lines: 2. Valid: 2. Invalid: 0.

FAQ

What is JSONL?

JSONL stands for JSON Lines. It is a text format where each line is a separate, valid JSON value. There is no outer array or comma between lines.

Is JSONL the same as NDJSON?

Yes. JSONL and NDJSON (Newline Delimited JSON) describe the exact same format. The terms are used interchangeably.

Why does my nested object appear as a string in the table?

To keep the table flat and readable, nested objects and arrays are serialized as compact JSON strings rather than expanded into additional columns.

Are blank lines counted as errors?

No. Blank lines are skipped silently and do not affect the valid or invalid line counts.

Can I view non-object JSON values like numbers or strings?

Yes. If a line contains a primitive JSON value such as a number, string, boolean, or null, it appears in a single column labeled Value.

Is my data sent to a server?

No. All parsing happens locally in your browser. Nothing is uploaded anywhere.