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:
CommentsPaste 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
- 1Paste your JSONL content or drop the .jsonl file.
- 2Each line is parsed independently; failing lines are flagged with their line number and error.
- 3Turn on fine-tuning mode to also check the messages array and role/content structure.
- 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
Batch API Cost Calculator
Compare real-time vs Batch API cost for a bulk job. Enter request count and per-request tokens to see how much the ~50% batch discount saves across models that support it. 100% local.
Prompt Injection Detector
Scan untrusted user input for common prompt-injection and jailbreak patterns — instruction overrides, jailbreak personas, system-prompt exfiltration — with a risk score. Heuristic, 100% local.
Text Chunker
Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.
Cosine Similarity
Compute cosine similarity, dot product, and Euclidean distance between two vectors online. Perfect for debugging LLM embeddings, semantic search, and RAG pipelines. 100% local — vectors never leave your browser.
AI Cost Calculator
Estimate monthly LLM API cost across GPT-4o, Claude 3.5, Gemini, DeepSeek and 100+ models. Compare providers side-by-side with prompt-caching and batch discounts. Free, no signup — prices refreshed daily from the public LiteLLM catalog.
Token Counter
Count tokens in your prompt for GPT-4, GPT-3.5, Claude, and Gemini and predict API cost before you spend. Free, no signup — all counting runs locally, your prompt stays in your browser.