AI & LLM Tools — Token Count, Pricing & Context
Browser-local utilities for LLM developers: count tokens, convert JSON↔TOON for prompts, estimate API costs, and check context-window fit. Also useful: word-counter and json-formatter.
- Count tokens before calling OpenAI, Anthropic, or Google APIs.
- Estimate run cost from input/output token counts.
- Check whether a prompt fits a model context window.
LLM token counter
Count tokens locally with exact tiktoken for OpenAI models.
LLM pricing calculator
Estimate API cost from input and output token counts.
Context window calculator
See prompt usage vs each model context limit.
Prompt optimizer
Analyze prompt structure, redundancy, and token waste — opt in to a local Qwen rewrite.
JSON → TOON
Convert JSON to TOON and compare tokens plus input cost vs JSON.
TOON → JSON
Decode TOON to pretty JSON with strict validation by default.
Guides

LLM API Cost: Batch API, Prompt Caching and Monthly Projection
Lower your OpenAI/Anthropic/Gemini bill: estimate input/output, model batch and caching in your calculations — verified rates, 100% local.

LLM Context Window: Size Your Prompts for GPT, Claude and Gemini
RAG, multi-turn agents, system prompts: calculate context-window usage and remaining headroom before calling the API.

When TOON Beats JSON for LLM Prompts (and When It Doesn't)
Honest guide: uniform tabular data, convert → count → price → context workflow; not a JSON/YAML replacement manifesto.

Count LLM Tokens and Estimate API Cost Locally (OpenAI, Claude, Gemini)
Before calling an LLM API: count tokens, estimate USD cost and check context-window fit — 100% in the browser without sending your prompt.