Overview
Fill the {{variables}} in any prompt template and preview the finished prompt before you send it, with an exact token count included. The renderer finds every variable in your template, asks you for values one per line, substitutes them, and counts tokens with a real GPT tokenizer - not a characters-divided-by-four guess. Everything happens in the browser.
How It Works
Paste a template containing placeholders like {{product}} or {{audience}}. The page lists the variables it found and gives you a values box where each line is name = value - the first equals sign separates name from value, so values may contain equals signs themselves. The rendered prompt appears in a copyable output pane as you type. Unfilled variables stay visible as {{name}} in the output rather than silently vanishing, which makes missing values obvious before you ship the prompt. A line under the output reports the rendered prompt's exact token count.
Step-by-Step Usage Guide
- Paste your template with {{variable}} placeholders.
- Check the list of variables the renderer detected.
- Enter values one per line as name = value.
- Copy the rendered prompt from the output pane, token count noted.
Technical Specifications & Standards
Variable names are matched with the pattern {{ name }} allowing optional whitespace, restricted to letters, digits and underscores - so {{user-name}} with a hyphen is not a variable, a constraint worth knowing when naming. Extraction collects unique names in order of appearance; using the same variable twice fills both occurrences from one value line. Substitution leaves a placeholder untouched when no matching value exists, and trims whitespace from supplied values. The token count is the interesting engineering detail: the page runs the actual GPT byte-pair-encoding tokenizer (the gpt-tokenizer library, covering the cl100k and o200k encodings) in your browser, which is why the tokenizer data is deliberately loaded only for the tools that need it rather than every page. Counts are exact for OpenAI models; Claude and Gemini use different tokenizers, so treat the figure as a close estimate, typically within a few percent, for those providers.
Targeted Use Cases
- Testing a notification or email template with several sample values before wiring it up.
- Iterating on a system prompt that takes a product name and audience as inputs.
- Sharing a templated prompt with teammates who should only edit the values.
- Checking the token cost of a rendered prompt against a model's context limit.
Notes & Gotchas
- Name variables with letters, digits and underscores only; hyphens break detection.
- Leave a variable blank on purpose to see where it lands in the output - it stays as {{name}}.
- Watch the token count when values are long; retrieval contexts inflate prompts fast.
- Keep one value per line; a line without an equals sign is ignored.
Frequently Asked Questions
How exact is the token count?
It uses the real GPT byte-pair tokenizer in your browser, so it is exact for OpenAI models. Claude and Gemini tokenise differently, making the count a close estimate there.
What happens to variables I do not fill?
They remain in the output as {{name}}, so an incomplete render is visible at a glance rather than silently producing a prompt with gaps.
Can a value contain an equals sign?
Yes. Only the first equals sign on a line separates the name from the value; everything after it, including further equals signs, belongs to the value.
Can I reuse one variable several times in a template?
Yes. Detections are deduplicated, so {{product}} appearing three times is listed once and all three occurrences get the same value.