Prompt Template Tester with Variables
Write a prompt with {{variables}}, fill in values, and preview the final rendered prompt instantly. It flags variables you used but never defined, and ones you defined but never used, counts approximate tokens, and can batch-preview several value sets against the same template at once — for developers, prompt engineers and anyone building reusable LLM prompts.
| Variable | Value | Status |
|---|
{{name}} in the template above, or click "Add variable".Updated Jul 11, 2026 · Built by Wayne
What it does
Catch prompt mistakes before you paste them anywhere
A prompt template is text with placeholders — {{customer_name}}, {{topic}}, {{tone}} — that you fill in at runtime, whether that runtime is a LangChain PromptTemplate, a hand-rolled Python .format() call, or just a system prompt you reuse across ChatGPT or Claude conversations. The two mistakes that quietly break these are easy to make and easy to miss by eye: a variable you reference in the template but forgot to fill in, so the literal string {{tone}} ships in your live prompt; and a variable you defined and filled in but renamed or deleted from the template, so it just sits there unused, usually a sign something drifted.
This tool renders the template live as you type, highlights any {{variable}} that is still unresolved directly in the preview, and separately flags rows in the variable table that are defined but never referenced. It also estimates the token count of the rendered output, since prompt length has real cost and context-window implications, and — its main differentiator versus a plain find-and-replace box — it can render the same template against a whole table of value sets at once, so you can eyeball ten variants of a prompt side by side instead of editing one field, copying, and repeating.
How to use it
Four steps, no setup
Write the template
Paste or type your prompt in the top box, using {{variable_name}} wherever a value should be substituted.
Fill in values
Detected variables appear automatically in the table below. Type a value for each — the preview updates as you go.
Check the warnings
Undefined variables stay highlighted in the preview; unused ones are tagged in the table. Fix either before you ship the prompt.
Batch it (optional)
Switch to Batch preview, add one row per case, and render every variant of the prompt at once.
Worked examples
Real input, real output
Example 1 — a support-reply system prompt
You are a support agent for {{company}}.
Customer tier: {{tier}}.
Reply to: "{{message}}"
Keep the tone {{tone}} and under 80 words.
company = Northwind Cloud
tier = Enterprise
message = My export job has been stuck at 40% for two hours.
tone = calm and precise
You are a support agent for Northwind Cloud. Customer tier: Enterprise. Reply to: "My export job has been stuck at 40% for two hours." Keep the tone calm and precise and under 80 words.
Example 2 — a variable defined but never used, and one used but never defined
Summarize this {{doc_type}} in {{max_words}} words
for a reader who is {{audience_level}}.
doc_type = research paper
max_words = 120
reading_time = 6 min
Summarize this research paper in 120 words
for a reader who is {{audience_level}}.
⚠ Undefined: audience_level (used in template, no value)
⚠ Unused: reading_time (has a value, not referenced)
FAQ
Questions developers actually ask
What variable syntax does it use?
Double curly braces, the convention used by Jinja2, Handlebars, LangChain's PromptTemplate and Anthropic's Console prompt evaluations: {{variable_name}}. Names start with a letter or underscore and may contain letters, numbers and underscores; {{ topic }} and {{topic}} are the same variable.
What's the difference between "undefined" and "unused"?
Undefined means the template references {{name}} but the variable table has no value (or an empty one) for it — it stays visible and highlighted in the preview so it can't slip into a prompt you copy by mistake. Unused means the opposite: a table row has a value, but that name never appears in the template — usually a typo or a leftover from an earlier edit.
Is my prompt sent to a server or to any AI model?
No. There's no backend and no network request. Detection, substitution, token counting and batch rendering all run in JavaScript in your browser tab; you can disconnect from the internet after the page loads and it keeps working. Nothing about your prompt or values is stored, logged or transmitted.
Is the token count exact for GPT, Claude or Gemini?
It's a close approximation, not an exact tokenizer. Real tokenizers use trained byte-pair-encoding vocabularies that differ per model and are too large to ship client-side. This tool estimates from word, number and punctuation counts using the rough rule providers publish — about 4 characters per token for common English — typically within 10-15% of the real count. Good for comparing variants and catching prompt bloat, not for billing-exact counts.
What is batch preview for?
It renders the same template against several rows of values at once, so you see every variant side by side instead of editing one field, copying, editing again. Useful for one system prompt per customer tier, one few-shot example per category, or one eval case per test row.
Does it work with LangChain, Jinja2 or Handlebars templates?
For plain {{variable}} substitution, yes — that covers LangChain's default PromptTemplate and basic Jinja2/Handlebars interpolation. It does not evaluate Jinja2 {% if %}/{% for %} blocks or Handlebars helpers — those show up as literal text, since this stays a plain-substitution previewer rather than a full template engine.
Does it save my templates or values?
Only in your browser's local storage on your own device, so a reload doesn't wipe your work — nothing is saved to a server. Click Reset to clear it. No account, cookie banner or tracking.