OpenAI Token Counter
Count text tokens and estimate cost for listed OpenAI model profiles
Last updated: October 14, 2026
How to use
- Select an OpenAI model from the dropdown at the top
- Paste your prompt or text into the input field
- Token count updates automatically as you type
- View token count, cost estimation, and context usage
- Click "Copy Results" to save the information
- Output tokens are estimated at ~15% of input tokens
Note: Token counting uses the js-tiktoken library for accurate counts. Output token estimates are based on typical usage patterns. For precise cost estimates, consult the OpenAI Pricing page. Pricing is based on current OpenAI rates and may change.
Result actions
Copy or download the tool output, or share a link to OpenAI Token Counter.
Get new tools in your inbox
An occasional email when we ship new free tools. No spam, unsubscribe anytime.
Related tools
Convert Words to Numbers
Convert English number words to numeric values
Add Commas to Integers
Add thousand separators to numbers
Convert ASCII Art to Image
Render ASCII art as a visual PNG image with customizable fonts and colors
HTML to Markdown
Convert HTML markup to Markdown format
Markdown to HTML Converter
Convert markdown syntax to valid HTML in real-time
Batch Text Replacer
Replace multiple text patterns at once with support for regex and case sensitivity
Estimate tokens for text sent to an OpenAI model
Paste text and choose one of the model profiles in the dropdown. The counter uses a matching js-tiktoken encoding when it loads successfully. If tokenizer loading or encoding fails, it estimates input tokens as one token per four JavaScript string characters. That fallback is approximate and can differ from the API tokenizer.
The page estimates output length as 15% of the input token count; it does not generate or count an actual model response. Cost and context usage use the values stored in the tool’s model table. Model availability, token handling, context limits, and API prices can change, so verify current OpenAI documentation and pricing before making a budget or API decision.
Text is counted in your browser and is not sent to OpenAI by this tool.