Nobuf

LLM Token Counter & Context Calculator

Lazy local tiktoken encodings

Count tokens, compare encodings, budget messages and split prompts with local tiktoken.

EncodingPrompt stays localRaw text count is exact for the selected encoding
Tokens
0
Characters
0
UTF-8 bytes
0
Characters / token

Source text

Text is encoded in this browser after its selected rank table loads.

Interactive token map

Hover for index, token ID and decoded UTF-8; click a token to copy its ID.

No token matches this filter.

# ID Text UTF-8

How to use it

  1. 01

    Tokenize the exact text

    Choose o200k_base or cl100k_base and inspect token IDs, visible text and UTF-8 representations locally.

  2. 02

    Plan the context budget

    Model messages, tool schema, context window, reserved output and illustrative per-million prices.

  3. 03

    Chunk and export

    Create token-bounded overlapping chunks and export token rows or a caveated planning report.

Frequently asked questions

Are raw text counts exact?

They are exact for the selected bundled encoding. A particular API model may select a different encoding or add service-specific content.

Why is message overhead labeled estimated?

Roles, wrappers, tools and service behavior vary by model and API revision; use the provider's server-side input-token endpoint as final authority where available.

Are the displayed costs current model prices?

No fixed price claim is made. Both per-million fields are user-editable planning inputs and default to zero.

Does prompt content leave the browser?

No. Encoding ranks are bundled as lazy static assets and tokenization, comparison and chunking are local.

Keep working with other focused browser utilities.

All tools

Local by default; remote data sources are clearly disclosed.

© 2026 Nobuf

Nobuf

Fast, local-first utilities powered by your browser.