snaptools
LLM Token Counter
⌃⏎ run · clear · / focus input
Token count
send output to
no matches
Result appears here as you type
runs in your browser · nothing uploaded
// about this tool

LLM Token Counter Online

Updated 2026-07-09

Count LLM tokens online for free. Paste any prompt and SnapTools shows how many tokens it uses with the GPT-3.5 / GPT-4 tokenizer (cl100k_base), alongside character and word counts — instantly, in your browser. Your text is never uploaded, so it is safe for confidential prompts.

Language models measure everything in tokens: the context window is a token budget, and API billing is per token. Because tokens do not map neatly to words — a rare word or a snippet of code can split into several — counting characters or words is not enough. This tool gives you the real token count so you can fit within a model's limit and estimate cost before you send.

// how to use

  1. 1 Paste your prompt or text into the input panel on the left.
  2. 2 SnapTools counts the tokens (plus characters and words) as you type.
  3. 3 Use the token count to estimate context usage and API cost.

// examples

Short sentence
Input
The quick brown fox jumps over the lazy dog.
Output
10 tokens · 44 characters · 9 words
Single word
Input
tokenization
Output
2 tokens · 12 characters · 1 word

// common uses

Estimating API cost before sending a prompt Checking a prompt fits within a model's context window Trimming prompts to reduce token usage Comparing how different phrasings tokenize

// faq

No. Tokenization runs entirely in your browser, so your prompt never leaves your machine — safe for confidential text.
A token is a chunk of text — often a word, part of a word, or a punctuation mark — that a language model processes as a unit. On average, English runs roughly four characters per token, but it varies with the text.
It uses the cl100k_base encoding, the tokenizer behind GPT-3.5 and GPT-4. Counts are a close guide for those models; other model families use different tokenizers and may differ slightly.
Models have a fixed context window measured in tokens, and API pricing is charged per token. Counting before you send helps you stay within limits and estimate cost.
Rare words, code, punctuation, and non-English text often split into multiple tokens, so the token count can exceed the word count even for short text.

Use this via API

Get a free API key →
curl -X POST https://snaptools.dev/api/v1/tools/llm-token-counter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick brown fox jumps over the lazy dog."}'
Esc
↑↓ navigate open Esc close