# Token Counter

> Free AI token counter. Count tokens and estimate costs for GPT-4o, Claude, Gemini, and other LLMs. Compare pricing across models. No signup required.

Estimate token counts and API costs for popular LLMs. Paste your text to see tokens, words, and characters instantly.

Input TextCopy stats

Tokens

~0

Words

0

Chars

0

Lines

0

Estimated Cost (Input)

GPT-4o$2.5/1M tokens

$0.00

Claude Sonnet$3/1M tokens

$0.00

GPT-4o-mini$0.15/1M tokens

$0.00

Estimates use ~4 characters per token (English approximation). Actual counts vary by model tokenizer.

Sample Texts

Short promptSummarize the following article in 3 bullet points, focusing on the key takeaways for developers.System promptYou are a helpful assistant specialized in code review. Analyze the provided code for bugs, security vulnerabilities, and performance issues. Provide actionable suggestions with code examples. Be concise and prioritize critical issues first.README excerpt# Getting Started Install the SDK using your preferred package manager: npm install @stack0/sdk Then initialize the client with your API key: import { Stack0 } from "@stack0/sdk"; const client = new Stack0({ apiKey: process.env.STACK0_API_KEY, }); const result = await client.ai.complete({ model: "gpt-4o", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "Hello, world!" }, ], });

### Build AI pipelines?

Stack0 AI Workflows lets you chain LLM calls, tools, and branching logic into production pipelines.

[Get Started Free](https://app.stack0.dev/)

## Related tools

[Prompt Playground](https://www.stack0.dev/tools/prompt-playground)[JSON Schema Generator](https://www.stack0.dev/tools/json-schema)[JSON Formatter](https://www.stack0.dev/tools/json-formatter)

Need programmatic access? [Stack0 Workflows](https://www.stack0.dev/apis/workflows) lets you automate this at scale.

---

Source: https://www.stack0.dev/tools/token-counter
llms.txt: https://www.stack0.dev/llms.txt
Sitemap: https://www.stack0.dev/sitemap.xml
Documentation: https://www.stack0.dev/docs
OpenAPI spec: https://www.stack0.dev/openapi.json
MCP server: https://api.stack0.dev/mcp
