DevKits

JSONL Validator (Fine-Tuning Dataset & JSON Lines Checker)

Validate a .jsonl / JSON Lines file line by line — each line must be a valid JSON object. Optional OpenAI fine-tuning mode checks the messages structure. Pinpoints the exact line and error. 100% local.

Last updated:

Comments

Paste or drop a .jsonl file to validate it line by line — every line must be a standalone JSON value. The validator reports the exact line number and error, and an optional fine-tuning mode checks the OpenAI messages/role structure.

✓ Valid — 2 lines parsed and fine-tuning structure checks pass.

What is JSONL Validator?

JSONL (JSON Lines, .jsonl) stores one independent JSON value per line, separated by newlines — the format behind log pipelines, bulk APIs, and, most commonly today, LLM fine-tuning datasets. Because each line is parsed on its own, a single malformed line can break an entire upload, and the error messages from training APIs are often unhelpful. This validator checks every line, points to the exact line number and problem, and in fine-tuning mode verifies the structure OpenAI expects: each line an object with a 'messages' array, every message carrying a valid role (system/user/assistant) and content. Everything runs in your browser, so you can validate a training set full of proprietary data without uploading it.

How to validate a JSONL file

  1. 1Paste your JSONL content or drop the .jsonl file.
  2. 2Each line is parsed independently; failing lines are flagged with their line number and error.
  3. 3Turn on fine-tuning mode to also check the messages array and role/content structure.
  4. 4Fix the flagged lines and re-validate before uploading to your training job.

Key Concepts

NDJSON / JSON Lines
The newline-delimited JSON media type this format uses.
Chat messages format
The system/user/assistant role structure fine-tuning datasets follow.

Tips & Best Practices

  • ▸JSONL is NOT a JSON array — don't wrap the lines in [ ]. Each line stands alone.
  • ▸A trailing blank line is usually fine, but stray whitespace-only lines in the middle will fail — remove them.
  • ▸For OpenAI chat fine-tuning, every example needs at least a user and an assistant message; a lone system message won't train.

Frequently Asked Questions

What is a valid JSONL file?

JSONL (JSON Lines) is one standalone JSON value per line, separated by newlines — not wrapped in an array. Each line must parse as valid JSON on its own. The validator checks every line and reports the exact line number and error for any that fail.

What does fine-tuning mode check?

In OpenAI fine-tuning mode, each line must be an object with a 'messages' array, and every message needs a valid role (system/user/assistant) and content. It flags empty datasets, missing messages, bad roles, and lines that aren't objects — the common reasons an upload is rejected.

Is my dataset uploaded?

No. Every line is parsed in your browser; your training data never leaves your device.

Try Next

LLM JSON Extractor

Extract every JSON object or array buried inside an LLM reply — even when it's wrapped in markdown fences, mixed with explanation text, or has trailing commas and single quotes. Auto-repairs each block. 100% local.

Related Tools

Reference & Guides