New

Token Counter

Runs in browser

Count approximate tokens for GPT-4, GPT-3.5, Claude, and Llama prompts. See words, characters, estimated input cost, and context usage before calling an API.

Token Counter tool

Tokens

59

Characters

235

Words

34

Estimated cost

$0.000295

Context usage59 / 128,000 (0.0%)

Approximate tokenization used: ~1 token per 4 English characters. Actual API token counts may vary by +/-5%.

How to use

  1. Pick model

    Select GPT-4o, GPT-3.5, Claude Sonnet, or Llama 2 to apply model pricing and context limits.

  2. Paste prompt

    Token, word, and character stats update in real time while you edit.

  3. Check limits

    Use the context progress bar and warning to trim prompts before sending requests.

Examples

  • Code review prompt

    Typical engineering prompt.

    Input
    You are a helpful assistant...
    Output
    ~50 tokens (approx)

Frequently asked questions

Is this exact tokenization?
No. It uses a fast approximation (about 1 token per 4 characters for English).
Why estimate cost from input only?
Output token usage depends on model response length, which is unknown ahead of time.

You might find these useful too.