JSONL Validator & Viewer

JSONL (one JSON object per line) is the format for LLM fine-tuning datasets, logs, and data pipelines — and a single bad line breaks the whole file. This tool checks every line independently, reports the exact line number and reason for each problem, and can apply the structural rules for OpenAI chat fine-tuning and Bedrock Claude fine-tuning. It runs entirely in your browser, so your training data never leaves the page.

0
Lines
0
Valid records
0
Errors
0
Warnings

    How to Use This Tool

    1. Pick a validation mode — Plain JSONL checks that each line is valid JSON; the OpenAI and Claude modes additionally apply each provider's fine-tuning format rules.
    2. Paste your JSONL into the box, or click "Load sample" to see a valid example for the selected mode.
    3. Read the results — the counters show total lines, valid records, errors, and warnings, and the list below pinpoints each issue by line number.
    4. Fix and re-check — edit the offending lines and the validation updates instantly, so you can clear every error before uploading to the fine-tuning API.

    Validating JSONL for Fine-Tuning

    JSONL — JSON Lines, sometimes called NDJSON — stores one independent JSON object per line. Because each record stands alone, the format is ideal for streaming, appending, and the line-by-line datasets that LLM providers require for fine-tuning. The flip side is that a single malformed line can cause an entire upload to be rejected, often with an unhelpful error, so validating locally before you upload saves a frustrating round-trip.

    The single most common error is wrapping the records in a JSON array. A file like [ {"a":1}, {"a":2} ] is valid JSON but is not JSONL, and fine-tuning endpoints reject it. Genuine JSONL has no enclosing brackets and no commas between records — just one object, a newline, the next object, and so on. Other frequent problems are trailing commas, single-quoted strings, unquoted keys, a stray byte-order mark, and blank lines that parse to nothing.

    Beyond raw JSON validity, each provider imposes a structure on the records. OpenAI expects a messages array with system, user, assistant, and tool roles and at least one assistant turn per example. Claude fine-tuning, offered through Amazon Bedrock, expects a top-level system field plus a messages array of strictly alternating user and assistant turns that starts with the user and ends with the assistant. This tool encodes those rules so you can catch a structural mistake — not just a syntax error — before you spend time and money on a failed training job.

    Frequently Asked Questions

    What is JSONL and how is it different from JSON?
    JSONL (JSON Lines, also called NDJSON) is a text format where each line is a separate, complete JSON value — usually an object — separated by newlines. Unlike a single JSON document, there are no enclosing brackets around the whole file and no commas between records. That makes it append-friendly and streamable: you can read or write one record at a time without parsing the entire file. The most common mistake is wrapping the records in a JSON array ([ {...}, {...} ]), which is valid JSON but not JSONL — fine-tuning APIs reject it.
    What does the OpenAI fine-tuning mode check?
    It applies the structural rules for OpenAI supervised chat fine-tuning: every line must be an object with a messages array; each message needs a valid role (system, user, assistant, or tool) and non-empty string content (an assistant message may instead carry tool_calls); each example must contain at least one assistant message (the training target); and an optional weight of 0 or 1 is allowed only on assistant messages. It also warns if you have fewer than 10 examples, OpenAI's documented minimum.
    What does the Claude / Bedrock fine-tuning mode check?
    Claude fine-tuning is offered through Amazon Bedrock (the Claude API itself has no self-serve fine-tuning), and its documented JSONL format differs from OpenAI's. This mode checks that each line has a messages array with only user and assistant roles, that the conversation starts with a user turn, alternates, and ends with an assistant turn, and that the system prompt lives in a top-level system field rather than a system-role message. It warns below 32 examples, the documented Bedrock Claude 3 Haiku minimum. The published format targets Claude 3 Haiku; newer Claude models are not currently documented as fine-tunable.
    Why does my fine-tuning upload fail validation?
    The most common causes are: the file is a single JSON array instead of one object per line; a trailing comma, single quotes, or unquoted keys make a line invalid JSON; a blank line or a byte-order mark (BOM) at the start of the file; a wrong role name like bot, ai, or human; an example with no assistant message to learn from; or, for Claude, putting the system prompt in a message instead of the top-level system field. This tool flags each of these with the exact line number.
    Is my data uploaded anywhere?
    No. All parsing and validation happen in your browser using JavaScript — your JSONL is never sent to Janeer or any server. That matters for fine-tuning datasets, which often contain proprietary prompts, customer conversations, or labeled examples you do not want to paste into an online service. You can validate sensitive training data here without it leaving your machine.