Token counter
Paste text or code to count tokens with the o200k_base encoding and see estimated token ranges for Claude and Gemini.
GPT models use OpenAI’s tiktoken o200k_base encoding for an exact count (GPT-5 models, GPT-4.1, GPT-4o, o3 and others). GPT-6 figures are estimates because its encoding has not been published. Claude and Gemini models have no public tokenizer. Exact counts require sending text to the provider’s API, so this tool estimates by character type and shows a range.
Characters
0characters
Excluding spaces and line breaks
0characters
Words
0words
English words
0words
Lines
0lines
UTF-8
0bytes
Token counts by file
| Files | Characters | GPT models (o200k_base) | Claude models | Gemini models |
|---|
Share of context window
| Model | Limit (tokens) | Percentage used |
|---|---|---|
| with a custom limit |
AI text preparation
TextCharacter counterPaste a draft to see its character and line counts, its size in bytes and how many characters you have left before a limit.TextRemove extra spaces and line breaksPaste text copied from a PDF to join broken lines and remove extra spaces while keeping the paragraph breaks you want.AI text preparationRemove Markdown formattingTurn Markdown into plain text for email or Word by removing formatting marks around headings, bold text, lists and links.AI text preparationMask personal informationReplace detected names, phone numbers and other personal details with numbered placeholders that you can restore after editing the text.