Skip to the tool

Tool

Filter JSONL by token length

Each line’s prompt, prompt plus response, or JSON.stringify is encoded with js-tiktoken o200k or cl100k. Lines outside min/max are dropped. This is not a Llama, Gemma, or GPT-6 vocabulary.

Encoding runs in this tab. Tokenizer rank files load from this site into the browser. GearDel does not receive the JSONL.

What is counted

Prompt is Alpaca instruction plus input, or the first user/human turn. Sample concatenates that prompt with Alpaca output or assistant/gpt turns, separated by a blank line. JSON uses JSON.stringify of the object.

encode() is js-tiktoken o200k_base or cl100k_base — the same encodings as the token-count page. Chat markup such as <|im_start|> is not inserted here. GPT-6 ranks are not in the library.

Min and max are inclusive token counts of that encoded string. 0–4096 is only a default interval, not a model context window.

A field that cannot be extracted is counted as missing and skipped. Each encoded string is clipped at 200,000 code points, same as the token-count page.

Blank lines are counted and skipped. A leading JSON array is rejected. At most 20,000 lines or about two million characters.

What this page does not do

  • It does not implement Llama, Gemma, Claude, Gemini, or a Korean SentencePiece tokenizer. Those numbers would differ.
  • It does not wrap ChatML or Llama 3 headers before counting. Use the chat-wrap page if you need that string.
  • It does not estimate GPU memory or dollar cost.

JSONL

Text that is encoded
js-tiktoken

js-tiktoken maps GPT-4o, GPT-4.1, o1, o3, o4-mini, and GPT-5 to o200k_base. No chat template is added.

0 encoded · 0 in range · 0 out · min — · max — · 0 blank · 0 errors · 0 missing field · 0 clipped

Questions

Why is this larger than counting the prompt box?

Sample mode adds the response. JSON mode counts quotes, keys, and punctuation in JSON.stringify. The token-count page encodes only what you paste.

Is 4096 the model limit?

No. It is the default max on this form. Change it to whatever cutoff you already use in training.

Does GearDel store the file?

No. Rank files load into the browser. The paste is not uploaded.

Related on GearDel

Pick a Korean dataset by task →

Korean LLM training rows →

Alpaca vs ShareGPT vs messages →

Eval sets vs training rows →

All browser tools →

Token count for Korean text →

Instruction JSONL checker and converter →

Korean characters and bytes →

CSV/TSV to instruction JSONL →

Korean NFC, NFD, and jamo →

Split JSONL into train, val, and test →

Wrap a chat template and count tokens →

Drop duplicate JSONL lines →

Whether train JSONL overlaps eval prompts →

Mask Korean phone, RRN, and email →

JSONL field viewer and row sampler →

Korean encoding damage and mixed speech levels →

Open catalog excerpts, not the files →

Flatten JSONL to CSV or TSV →

Build a citation from catalog fields →