---
title: "Token Counter: Count GPT and Claude Tokens"
description: "Free token counter for GPT (o200k_base, cl100k_base) and Claude. Paste text or a URL to compare HTML, text and Markdown. GPT counts run in your browser."
canonical: "https://browser-use.com/tools/token-counter"
last_updated: "2026-11-17"
---

# Token Counter: Count GPT and Claude Tokens

## Free Token Counter

Count GPT tokens in your browser and see how text splits. Add your Anthropic key for a Claude count, or compare a web page as HTML, text and Markdown.

## How it works

### Paste text or a URL

Text is counted in this tab as you type. A URL is fetched once; its HTML, text and Markdown are counted here.

### Read both encodings

o200k\_base and cl100k\_base side by side, with every token highlighted.

### Add Claude if you need it

With your Anthropic key, the text goes from this tab to Anthropic's token counting API. No key, no Claude number.

### Which models use which encoding?

o200k\_base: GPT-5, GPT-4.1, GPT-4o, o1, o3 and o4-mini. cl100k\_base: GPT-4, GPT-3.5 Turbo and text-embedding-3.

Source: [tiktoken model table](https://github.com/openai/tiktoken/blob/main/tiktoken/model.py)

### How is the Claude count made?

Your key and text go from this tab straight to Anthropic's count\_tokens endpoint, never to our server. Counting is free but rate limited. Anthropic calls the result an estimate that can include a few tokens it adds.

Source: [Anthropic: token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting)

### Does my text leave the browser?

GPT counts run in this tab. Count a URL sends only the URL to our server. Count with Claude sends the text and your key to Anthropic. The key is kept only if you tick Remember.

### Is <|endoftext|> one token here?

No. Pasted text is counted as plain text, so special-token names count as their characters and never stop the count.

## Give your agent the page, not the HTML.

Browser Use agents open pages in a real browser, including dynamic ones, and return structured data.

[See AI web scraping](https://browser-use.com/web-scraping)

SourcePaste textCount a URL

TextCount tokens before you send a prompt. def greet(name: str) -> str: return f"Hello, {name}!" Emoji 👩‍👩‍👧‍👦 👍🏽 and other scripts: 東京 مرحبا café

Open fileLoad exampleClear

GPT counts run in your browser.

## Claude count

Uses your Anthropic API key. The text and key go from this tab straight to Anthropic, never to our server.

ModelClaude Opus 5.5Claude Sonnet 5.5Claude Haiku 5.5

Anthropic API key

Count with Claude

Remember the key in this browser

---

BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.06/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)
