System Prompt Analyzer

Paste the system prompt you send with every API call. The analyzer counts its tokens for each OpenAI, Anthropic and Google model in the site's price file, shows what the prompt alone costs per call and with a cache hit, checks it against each model's minimum cacheable length, and points out headings, list items and phrases you repeat. The prompt is tokenized in your browser and is not uploaded. Prices were checked on 2026-11-12.

How to use the System Prompt Analyzer

  1. Paste the system prompt (the fixed part of your request: instructions, rules, output format) and press Analyze.
  2. The top row counts characters, Markdown headings (# to ###### at the start of a line), bulleted lines (- or *) and numbered lines (1. or 1)).
  3. The table lists every chat model in the price file with the prompt's token count, its input cost per call, the cost when it is read from the prompt cache, the model's minimum cacheable length and whether your prompt reaches it.
  4. Below the table, any 5-word phrase that appears 3 or more times is listed.

Load example loads a code-review prompt. It has 3 headings and 4 numbered instructions, no bulleted lines, and no phrase repeated 3 times. By contrast, Always cite the line number. Be brief. Always cite the line number. Use bullets. Always cite the line number. reports always cite the line number. — 3×.

What the numbers mean, and where they come from

Token counts. OpenAI models are counted with OpenAI's own tokenizer (o200k_base for the current models) via the js-tiktoken library, loaded from a CDN on first use; if it cannot load, the count falls back to an estimate and is marked est. There is no public in-browser tokenizer for Claude or Gemini, so those counts are always estimates from a character-based formula and are marked est. Estimates are rougher for code and for non-Latin scripts. Claude Opus 4.7 and later use a newer tokenizer that produces more tokens for the same text; the price file records that factor and the tool applies it, which is why those rows show more tokens than older Claude models.

Cost per call is the prompt's tokens times the model's list input price. It covers the system prompt only: the user message, tool definitions and the model's output are billed on top. Cached read is the price when the prompt is served from the provider's prompt cache. Where a model has a different rate above a prompt length (a long-prompt tier), that rate is used.

Caching minimum. Providers only cache prompts above a minimum length; below it, caching is silently skipped. For Claude the price file records: 512 tokens for Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5; 1,024 tokens for Sonnet 4.6; 2,048 tokens for Opus 4.7; 4,096 tokens for Haiku 4.5. For models where the file has no minimum, the table shows "not recorded" rather than guessing.

Repetition is counted on lowercased words with punctuation kept, so number. and number are different words. Overlapping phrases are counted separately, so one long repeated sentence can produce several entries.

Common use cases

  • Before turning on prompt caching: check the stable prefix clears the minimum for the model you use; if it does not, caching saves nothing.
  • Trimming a prompt that grew by copy-paste: the repeated-phrase list shows instructions stated three times.
  • Budgeting a switch between models: the same prompt costs different amounts per call, and on newer Claude models it is also more tokens.
  • Reviewing a team's prompt for structure: a long prompt with no headings and no lists is usually harder for both people and models to follow.

Limits

  • Claude and Gemini token counts are estimates; use the provider's token-counting API when you need the exact number.
  • Prices are list prices in USD per million tokens from the site's price file, checked on 2026-11-12. Batch discounts, regional pricing and negotiated rates are not applied.
  • The analysis is mechanical: it does not judge whether an instruction is clear or correct.

Frequently asked questions

Is my prompt sent to OpenAI, Anthropic or anyone else?

No. Tokenizing and counting happen in your browser. The page only downloads the open-source tokenizer library; your text is not part of any request.

Why are the Claude and Gemini counts marked "est"?

Neither provider publishes a tokenizer that runs in the browser, so the tool estimates from character counts. Their token-counting API endpoints give exact numbers.

Why do Opus 4.7 and newer Claude models show more tokens?

They use a newer tokenizer that splits the same text into more tokens. The ratio comes from Anthropic's models overview and is stored in the site's price file.

Why does a model say "not recorded" for caching?

The price file has no minimum cacheable length for that model, so the tool does not guess one.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: