How OpenAI tokenization works
OpenAI models use byte-pair encoding (BPE). Current GPT-5 and GPT-4o generation models use the o200k_base encoding; older GPT-4 and GPT-3.5 models used cl100k_base.
English prose averages about 4 characters or 0.75 words per token. Code, JSON, URLs, and non-English text tokenize heavier.
Both the prompt you send (input tokens) and the response (output tokens) are billed, at different rates per model.
This page loads the official tokenizer encodings in your browser, so counts are exact for text input and nothing you paste is uploaded.