JSONL Linter, Validator & LLM Dataset Formatter
Copied!
Formatted JSONL (OpenAI messages)
JSONL Linter & Formatter — Clean Fine-Tuning Data
The JSONL Linter & Formatter validates and normalizes JSONL (JSON Lines) data for LLM fine-tuning. It accepts prompt/completion or custom key names and outputs OpenAI-style message objects, one per line, so you can upload clean data to OpenAI or compatible pipelines.
Why Use This Tool?
- Validate: Catch invalid JSON early so uploads don’t fail.
- Normalize: Convert prompt/completion or input/output into a single messages format.
- No server: All processing runs in the browser.
Key Features
- One JSON per line: Parses strict JSONL; reports the first bad line.
- OpenAI format: Outputs
{"messages": [{"role":"user","content":"..."}, {"role":"assistant","content":"..."}]}. - Flexible input: Recognizes prompt/completion and input/output keys.
- Copy: One-click copy of the formatted JSONL.
How it Works
The tool splits input by newlines, parses each non-empty line as JSON, and maps known key names to the messages structure. If any line fails to parse, it shows the line number and error. The result is written back as one compact JSON object per line.
Try the JSONL Linter & Formatter
Paste your JSONL above. The formatted output appears below. Fix any reported line errors and copy the result for your fine-tuning job.