Count the tokens in text or a web page
Paste text to see its tokens, characters and words. Enter a URL to see what the page costs a model as raw HTML next to clean markdown, and why the gap is so large.
What it costs
- Here, right now
- Free, no key
- Through the API
- 1 credit a page as markdown
- On signup (work email)
- 500 free credits
- Tokens
- 0
- Characters
- 0
- Words
- 0
GPT-4o tokenizer · counted in your browser, nothing is sent
Counted where you are
Pasted text is counted in your browser with the GPT-4o tokenizer. Nothing you paste is sent anywhere.
A page, both ways
Enter a URL to see the tokens in the HTML a site sends next to the tokens in its readable content.
What it costs at scale
See what a thousand pages like it cost as model input at three common prices per million tokens.
Questions
A token is the unit a language model reads and bills by. Common English words are one token, longer or rarer words split into several, and spaces and punctuation count too. As a rule of thumb, one token is about four characters or three quarters of a word in English.
The GPT-4o tokenizer, o200k_base, which also covers GPT-4.1 and the o-series models. Other model families split text differently, so their counts differ by a few percent either way, but the size of the gap between HTML and markdown holds.
Raw HTML carries scripts, styles, class names, navigation and tracking markup around the text you care about. On a typical page most of the tokens are markup. Converting the page to clean markdown first usually removes the large majority of them while keeping the headings, lists, tables and links.
No. Pasted text never leaves your browser; it is counted on your machine. Only the URL mode fetches anything, and only the page you enter.
Use the tokenizer library for your model family. To cut what pages cost in the first place, fetch them through the API as markdown instead of HTML: one credit a page, and failures are never billed.
[ Start ]
Stop paying for markup. Send models markdown.
Any URL as clean markdown, one credit a page, failures never billed.
Success rate
Median scrape
ms