Free tool · no key · runs on the live API
Token counter for any URL
Paste a URL to see how many tokens the page costs an LLM as raw HTML, as Markdown, and pruned to a question. The numbers are the ones the ContextFetch API reports for that page, not counted in your browser.
How it works
The tool calls the ContextFetch reader, GET https://api.contextfetch.dev/r/<url>, and reads the token headers of its response: X-Raw-Tokens for the raw HTML and X-Output-Tokens for the Markdown. With a question it makes a second call with ?q=, whose X-Output-Tokens is the pruned text. The second call reuses the page the first one fetched (the API keeps a fetched page for up to 48 hours), so the page is not fetched twice.
To read the text itself, use URL to Markdown. For the same three numbers on the homepages of the most linked-to sites, see the AI crawler report.
Questions
How are tokens counted?
Characters divided by four, rounded up, the same estimate the API reports in its X-Raw-Tokens and X-Output-Tokens headers. It is an estimate: a model's own tokenizer counts differently.
What does pruned mean?
With a question, the reader splits the page's Markdown into chunks, scores them against the question with a cross-encoder model and keeps only the passages that score as relevant, in their original order. Nothing is generated: every word comes from the page.
Is it free?
Yes. One count is one keyless request, or two with a question. Every network gets 25 keyless requests a day, with no key or signup.
Can I get these numbers from the API?
Every GET https://api.contextfetch.dev/r/<url> response carries X-Raw-Tokens, X-Output-Tokens and X-Token-Savings. Without ?q= they compare raw HTML with Markdown; with ?q= they compare the Markdown with the pruned text.
How are tokens counted?
Characters divided by four, rounded up, the same estimate the API reports in its X-Raw-Tokens and X-Output-Tokens headers. It is an estimate: a model's own tokenizer counts differently.
What does pruned mean?
With a question, the reader splits the page's Markdown into chunks, scores them against the question with a cross-encoder model and keeps only the passages that score as relevant, in their original order. Nothing is generated: every word comes from the page.
Is it free?
Yes. One count is one keyless request, or two with a question. Every network gets 25 keyless requests a day, with no key or signup.
Can I get these numbers from the API?
Every GET https://api.contextfetch.dev/r/<url> response carries X-Raw-Tokens, X-Output-Tokens and X-Token-Savings. Without ?q= they compare raw HTML with Markdown; with ?q= they compare the Markdown with the pruned text.
More free tools
- URL to MarkdownPaste a URL, get the clean Markdown the API returns for it.GET /r/{url}
- AI crawler checkerWhich AI crawlers a site's robots.txt blocks: GPTBot, ClaudeBot and more.GET /r/{site}/robots.txt
- AI-ready badgeA badge for your site with its AI crawler rules and llms.txt status from our crawl.
- llms.txt generator and validatorCheck a site's llms.txt against the format, or draft one from its URLs.GET /r/{site}/llms.txt, POST /v1/map
- Site mapperA site's URLs from its links and sitemaps, without fetching the pages.POST /v1/map
- Search API cost calculatorMonthly cost at list price for ContextFetch, Exa and Tavily.
Give your agent the web
Your free key comes with 2,500 credits, no signup. One credit is one search or one page read.