Prompt Variable Replacer
Fill {{variables}} in prompt templates with live preview.
About the Prompt Variable Replacer
The Prompt Variable Replacer turns a prompt template full of {{variable}} placeholders into a fill-in-the-blanks form and produces a finished prompt live as you type. Paste a template such as "Write a {{tone}} email about {{topic}}", and the tool detects every placeholder with a regex, renders one labelled input field per unique variable, and shows a running "3 of 9 filled" counter so you always know what is still missing. Empty variables deliberately stay visible in the final prompt, which makes it impossible to ship a template with half-filled blanks. A Fill placeholders button quickly stubs any leftovers with angle-bracket values, while Load sample restores a nine-variable content-writing template you can use as a starting point. Everything runs locally, so confidential customer names and campaign details never leave the browser. This prompt template filler is built for teams who reuse prompts across customers, campaigns, or languages: maintain one canonical template, then fill in the variables per job instead of hand-editing copy and introducing typos.
Examples
You are a {{role}} with {{years}} years of experience.
Write a {{tone}} {{content_type}} about {{topic}} for {{audience}}.
Constraints:
- Length: {{length}} words
- Include {{num_examples}} examples
- Reading level: {{reading_level}}9 variables detected — one labelled input for role, years, tone, content_type, topic, audience, length, num_examples, and reading_level. "0 of 9 filled". The final prompt keeps every {{placeholder}} visible until you type values.Keep the sample template, then fill: role = copywriter, years = 7, tone = conversational, content_type = blog post, topic = email marketing, audience = small business owners, length = 600, num_examples = 2, reading_level = grade 8.
You are a copywriter with 7 years of experience. Write a conversational blog post about email marketing for small business owners. Constraints: - Length: 600 words - Include 2 examples - Reading level: grade 8
{{tone}} email about {{topic}}. Keep the {{tone}} throughout.
→ then type "friendly" into the tone field.friendly email about {{topic}}. Keep the friendly throughout.How to use
- 1
Paste a template containing {{name}} placeholders into the Prompt template field — the hint below updates with how many variables were detected.
- 2
Use Load sample to load the bundled nine-variable content template, or keep your own template.
- 3
Type a value into each input in the Variables card; the "N of M filled" counter and the badges track your progress.
- 4
Watch the Final prompt box update live — filled variables are replaced everywhere, and empty ones stay visible as {{name}} placeholders.
- 5
Click Fill placeholders to stub any remaining gaps with <value> hints, then copy or download the finished prompt via the results box.
Common use cases
- Personalise outreach at scale — one cold-email template with {{name}}, {{company}}, and {{pain_point}} filled per recipient.
- Localise content prompts — the same template re-filled with a different {{language}} or {{tone}} per market.
- Reuse campaign templates across products — swap {{topic}} and {{audience}} instead of rewriting the prompt each quarter.
- Prepare batch generation jobs — produce dozens of filled prompts for a queue, keeping structure identical across the batch.
- Run checklist-style filling for teams — the "N of M filled" counter makes it obvious when a template is ready to ship.
- Teach prompt engineering — newcomers see exactly where variables belong in a template and what a filled prompt looks like.
Best practices
- Name variables with snake_case words ({{customer_name}}, {{num_examples}}): the Fill placeholders button converts underscores to spaces when generating stubs, giving readable values like <customer name>.
- Keep variable names stable across your team: the detector shares one input field for repeated names, so inconsistent naming between templates silently duplicates fields instead of merging them.
- Use the "N of M filled" counter as your release checklist — ship the prompt only when every variable is filled, since empty placeholders remain visible in the output and would reach the model as literal {{tokens}}.
- Fill the trickiest variables first (tone, reading_level) and stub the mechanical ones later — leaving placeholders visible in the final prompt shows exactly which blanks still need attention.
- Build one master template per workflow instead of per-campaign prompts: a single template with {{topic}} and {{audience}} means every variant inherits the same structure and only the values change.
- Use Fill placeholders as a scaffolding pass: it marks every gap with a bracketed hint, then you replace each hint with real values one field at a time.
Tips
- Name your variables with underscores ({{num_examples}}, not {{numExamples}}): Fill placeholders converts underscores to spaces in the generated stubs.
- The Load sample button also clears your values — a handy reset when you want the template back without the clutter.
- Unfilled placeholders survive into the copied output, so give the final prompt one last scan for {{braces}} before pasting it into a model.
- Duplicate variables share one input — use that to keep repeated details like {{tone}} consistent across a long template for free.
Frequently asked questions
Explore more misc tools
Browse the full collection of misc tools on the hub, or jump back to all categories.