jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

Chat Template Preview

updated 26 August 2026

What your fine-tuning data actually looks like to the model. A JSONL file is a list of role/content objects, and no model has ever seen one — what a model sees is a single string built by its chat template, special tokens and all. Paste your records and read that string.

100% client-side. No upload.

Render

Drop a .jsonl file here, or

Why this matters

Fine-tuning bugs divide almost perfectly into two kinds: the data is wrong, or the template is wrong. Validators catch the first. The second is invisible in the JSONL, because the JSONL is correct — it is what the trainer does with it that differs. A model that will not stop generating, a model that starts every reply with a stray header, a system prompt that seems to be ignored: all three are template mismatches, and all three are obvious the moment you look at the string.

What each template does differently

The generation prompt

At inference the template appends an empty assistant header — <|im_start|>assistant\n for ChatML — to tell the model it is its turn. During training that suffix is not added, because the assistant reply is already there. Toggle it to see both, and to check that the reply in your data begins exactly where the generation prompt ends. A leading space or newline that is present in training and absent at inference is a real, and very annoying, source of drift.

What the status line tells you

Things worth checking in the rendered string

  1. Is the system prompt where you expect? On Mistral and Gemma it will have moved.
  2. Does every assistant turn end with the stop token? That token is what teaches the model to stop.
  3. Is there exactly one BOS? Llama tokenizers add <|begin_of_text|> themselves in some trainer configurations, which gives you two. Two is not harmless.
  4. Does the content contain the special tokens as literal text? If a user message in your data literally contains <|im_end|>, it will terminate the turn early. Search the rendered string for them.

FAQ

Is this the same string my trainer will produce?

It is the documented form of each template, and it matches what tokenizer.apply_chat_template produces for the standard configurations. It cannot account for a model repo that ships a customised chat_template in its tokenizer config — when in doubt, print the trainer's own output and compare it with this side by side. That comparison is the point.

Does it tokenize?

No. Real tokenization needs the model's vocabulary, which is tens of megabytes per model. The token figure is the 4-characters-per-token estimate, which is close enough to spot a record that will blow the context window and not close enough to budget with.

Can I use my legacy prompt/completion file?

Yes. A record with prompt and completion is read as one user turn and one assistant turn, and a note says so. Converting properly is what chat format converter is for.

Is my data uploaded?

No. Everything is rendered in this page.

Related tools