Prompt Template Builder
Write a prompt template with {{variables}}, fill them from a form or JSON, and copy the finished prompt.
How to use this tool
Steps for using the Prompt Template Builder.
- Write or paste a prompt into the Template panel, using
{{name}}wherever a value should go. Click Sample to load a code-review template. - A field appears under Variables for every placeholder the tool detects. Type a value into each one — fields for repeated variables fill every occurrence.
- To fill many values at once, click Fill from JSON, paste an object such as
{"language": "Go"}and click Apply JSON. Nested values are read with dot paths like{{user.name}}. - Check the Output preview: filled values are highlighted green, defaults amber and unfilled placeholders red, with a warning listing anything still missing.
- Choose whether unfilled placeholders stay as
{{name}}or become empty text, then Copy or Download the finished prompt.
Example
Fill a template with a default value
Dear {{name}}, re: {{subject|your request}}. {{sig}}
name = AdaDear Ada, re: your request. {{sig}}
Warning: 1 variable is not filled — sigCommon use cases
- Reusing a carefully worded code-review, summarisation or extraction prompt across many inputs.
- Preparing a handful of test prompts from a JSON record before wiring a template into application code.
- Spotting variables you forgot to fill before pasting a prompt into a chat interface or API request.
- Sharing a prompt with teammates as a template plus a JSON file of values instead of many near-duplicate prompts.
- Checking roughly how long a filled prompt will be before sending it to a model with a limited context window.
How prompt templates and placeholders work
A prompt template separates the fixed instructions of a prompt from the parts that change between runs — the document to summarise, the programming language, the user's question. Keeping them apart makes prompts easier to review, version and reuse: you can improve the wording once and apply it to every input. This builder uses the familiar double-brace style found in Mustache, Handlebars and Jinja-like tools, but only implements simple substitution — there are no loops, conditionals or filters, so what you see in the template is exactly what gets filled.
Placeholder names must start with a letter or underscore and may contain letters, digits, underscores, dots and hyphens; whitespace inside the braces is ignored, so {{name}} and {{ name }} are the same variable. A default can be given after a pipe — {{tone|friendly}} — and is used whenever the field is left empty. The default is trimmed of surrounding spaces. Something like {{1st}} is not a valid name, so it is kept as literal text and listed in a note so typos do not silently disappear. Write \{{ when you need literal double braces in the prompt, for example when the prompt itself discusses template syntax.
When you fill from JSON, each variable name is looked up in the object. An exact key match wins first (so a key literally named user.name works), otherwise the name is treated as a dot path into nested objects and arrays, such as items.0.title. Strings are inserted as-is, numbers and booleans are converted to text, null becomes empty, and objects or arrays are inserted as pretty-printed JSON — handy for passing structured context to a model. Values from JSON are merged into the form, so you can still edit them afterwards.
The character count is exact (Unicode code points), while the token figure is an estimate from the same heuristics as the Token Estimator: real tokenizers differ between models, so treat it as a ballpark for staying within a context window. Everything happens in memory in your browser; nothing is saved, so copy or download the template if you want to keep it.
Limitations
- Only substitution is supported — no conditionals, loops, filters or partials as in full Handlebars or Jinja.
- Templates and values are kept in memory only and are lost when you close or reload the page.
- The token count is an estimate and will differ from any specific model's tokenizer.
- An empty field counts as unfilled; to deliberately insert nothing, choose Replace with empty text.
Frequently asked questions
Is this compatible with Mustache or Handlebars templates?
Simple {{name}} and {{object.property}} placeholders work the same way. Sections, helpers, partials, triple braces and the {{name|default}} syntax are not interchangeable, so complex Handlebars templates will not render identically.
How do I include literal {{ braces }} in my prompt?
Put a backslash before them: \{{example}} appears as {{example}} in the output and is not treated as a variable.
What happens to variables that I leave empty?
If the placeholder has a default, the default is used. Otherwise it is listed in the warning and either left as {{name}} or replaced with nothing, depending on the Unfilled variables option.
Can I fill nested values from JSON?
Yes. Use dot paths in the template, such as {{customer.address.city}} or {{items.0.name}}. If the JSON value is an object or array, it is inserted as formatted JSON.
Are my prompts stored or sent anywhere?
No. The template, values and output stay in your browser's memory and are discarded when you leave the page. Nothing is sent to a server or to any AI model.