Tool

Token count for Korean text

The box is encoded with the published BPE ranks from js-tiktoken. No chat template is added. The number is the token count of the text you pasted.

The text stays in this tab. The tokenizer files load from this site into the browser. GearDel does not receive the paste.

How the count is made

The page lazy-loads js-tiktoken and one BPE rank file: cl100k_base or o200k_base. Other pages on GearDel do not download those files.

cl100k_base is the encoding js-tiktoken maps to GPT-3.5-turbo and GPT-4 (not GPT-4o). o200k_base is the encoding it maps to GPT-4o and later OpenAI names that use o200k.

encode() runs on the exact string in the box. Chat markup such as <|im_start|> is not inserted. Special-token strings are split as ordinary text unless they appear as the library’s special tokens and you have typed them as such.

The Hangul-to-token ratio on the result row is taken from that encode, not from a fixed Korean formula.

What this page does not do

  • It does not implement Claude, Gemini, Llama, or Korean-only tokenizers. Those would be different numbers.
  • It does not estimate dollar cost. Billing depends on the vendor, the model, and request overhead, none of which are counted here.
  • It stops at 200,000 code points so the tab stays usable. Longer text needs splitting.

Paste text

Encoding js-tiktoken maps to GPT-3.5-turbo and GPT-4 (not GPT-4o)

Tokens
—
Code points
0
Hangul syllables
0
Tokens / 100 code points
—

Tokens / 100 code points is this paste only. It is not a Korean-language average.

Questions

Does Korean use more tokens than English?

For the same number of characters, encode() often returns more tokens for Hangul because BPE splits it more finely. The ratio is whatever this paste produces, not a published average.

Why do GPT-4 and GPT-4o differ?

They use different encodings in js-tiktoken: cl100k_base versus o200k_base. Switch the button and count the same paste twice.

Is this the same as the OpenAI API?

It uses the same published ranks through js-tiktoken. It does not add a chat template or count HTTP overhead. If your client wraps messages, wrap them before pasting.

Related on GearDel

Pick a Korean dataset by task →

Korean LLM training rows →

Instruction JSONL checker and converter →

Korean characters and bytes →