JSONL Viewer & Converter.
View JSON Lines as a table, convert JSONL ↔ JSON arrays, and check chat fine-tuning datasets.
Runs in your browserAbout JSONL Viewer & Converter
JSON Lines, also called JSONL or NDJSON, stores one JSON value per line. It is the format of choice for LLM fine-tuning datasets, batch API requests and results, log exports and evaluation sets, because files can be streamed and appended without rewriting them. It is also easy to break: one stray comma or an unescaped line break inside a string makes a whole upload fail. This tool reads JSONL and reports every invalid line with its line and column number, up to twenty at once, so you can fix them in one pass instead of re-uploading after each error. In JSONL to JSON mode it turns the records into a pretty-printed JSON array; in JSON to JSONL mode it does the reverse, writing each array element as one compact line. Every mode shows a table preview of the first hundred records, with nested values shown as JSON, plus the record count and the number of distinct keys. The check-chat mode validates the common chat fine-tuning shape, where every line is {"messages": [...]} with system, user and assistant turns: it flags records without a messages array, unknown roles, empty content, and conversations that do not end with an assistant message, which is what the model learns to produce. For example, a record that ends with a user turn is reported as a problem. Blank lines are skipped and counted. Files up to 20 MB are processed locally in a background worker, and nothing is uploaded.
How to Use
- Choose a mode and paste JSON Lines or a JSON array, or drop a .jsonl file into the input.
- Fix the lines reported with their line and column numbers.
- Copy or download the converted result, or read the chat dataset report.
Frequently Asked Questions
Is JSONL the same as NDJSON?
Practically yes. Both store one JSON value per line separated by \n. JSONL files often use the .jsonl extension, NDJSON files .ndjson; this tool reads both, and Windows line endings are fine.
What does check-chat validate?
That each record has a non-empty messages array, every message has a role of system, developer, user, assistant or tool with non-empty content (assistant tool calls are allowed without content), and that the last message is from the assistant.
How large can the file be?
Up to 20 MB. The preview table shows the first 100 records, while the conversion and statistics cover the whole file.
Is my dataset uploaded?
No. Parsing and conversion run in your browser.
Related Tools
Pretty print, minify, and validate JSON.
Convert between CSV and JSON formats.
View JSON as a tree with types and sizes, and get the JSONPath and JSON Pointer of every value.
Fix broken JSON — trailing commas, single quotes, comments, missing brackets — and see every repair made.
Estimate how many LLM tokens a prompt uses, with a breakdown by words, numbers, symbols and scripts.
Convert Chat Completions requests to Anthropic Messages requests and back, including tools and images.