DevTools Logo

LLM Token Counter

LLM Token Counter

Visual BPE tokens, model selector, and input cost estimate from the pricing catalog

Prompt text

Paste text to tokenize in a Web Worker

93 chars · 14 words · 1 lines

About this tool

Visual BPE token counter with model-aware encoding and catalog-based input cost estimate. Uses gpt-tokenizer in a Web Worker — no LLM inference.

How to use

  1. Paste text

    Load sample or paste your prompt.

  2. Select model

    Pick a catalog model for encoding and cost.

  3. Inspect tokens

    Colored blocks show each token; count and cost update live.

Frequently asked questions