Prompt Counter
Count tokens, words, and characters in a prompt.
About this tool
Paste a prompt and see how long it is in the three units people use: tokens (for limits and cost), words (for readability) and characters (for form fields). The numbers update as you type and nothing is sent anywhere.
How to use
How it works
Tokens are counted with the o200k_base tokenizer; words are split on whitespace; characters are the raw string length including spaces and line breaks. Because the three measures differ, a long word list, code or numbers can have far more tokens than words.
Worked example
A two-sentence system prompt
- Input
- You are a helpful assistant. Answer in one sentence.
- Output
- 11 tokens, 52 characters, 9 words
- Walkthrough
- Nine words become 11 tokens. Add this to the tokens of the user message and the expected reply to plan your total context.
Limitations
- Counts the prompt text only, not API message overhead or tool definitions.
- Token counts are exact for o200k_base models and an estimate for others.
- It does not analyse prompt quality.
Questions
How do I count tokens in a prompt?
How many tokens is 1000 words?
Is my prompt stored?
What is the difference between this and the token counter?
Features
- Tokens, words, characters
- Live as you type
- Private
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
TensorFlow 2.0 Complete Course
freeCodeCamp.org
Practical ML stack context next to AI utilities.
Watch on YouTubeBig-O Notation in 100 Seconds
Fireship
Complexity intuition when estimating training/inference cost.
Watch on YouTube
- Machine Learning Crash Course
Google Developers
Official ML crash course pairing with metric calculators.
- Hugging Face docs
Hugging Face
Model hub docs next to tokenizer and embedding helpers.