Prompt Template Builder
Write a system and user prompt with {{variables}}, fill each one in a form, and copy the finished prompt in the format your code or chat needs.
Last checked
Template
My templates (0)
Saved in this browser only. Your draft is also kept here.
Load a template JSON
Variables
Write a template with {{variables}} or try the sample. Each variable gets a field here, and the finished prompt appears under them.
How to use it
- Write the system prompt and the user prompt. Put each part that changes in double braces, for example {{customer_name}}.
- Fill in the fields that appear under Variables. The count tells you how many are still empty.
- Pick an output format and copy it. For code, choose the API and the language, and set the model and max_tokens.
- Save the template under a name to reuse it later, or copy a share link to send it to a colleague.
What it checks and why
A prompt you use more than once usually has a fixed part and a few parts that change: a product name, a tone, a piece of text to work on. Keeping the fixed part in a template and the changing parts in named variables makes the prompt easier to reuse and to test, because only the values move. Anthropic's prompting best practices write such inputs as {{DOUBLE_BRACES}} in their own examples.
The builder uses the same double-brace syntax as Mustache, Handlebars and Jinja, so a template written here can be dropped into most code that renders those, as long as the names use only letters, digits and underscores. It only substitutes values; it has no loops, conditions or filters. LangChain and Python f-strings use single braces instead; the builder offers to convert those.
The two API formats differ in one place. OpenAI's Chat Completions API takes the system prompt as the first message with the role system, while Anthropic's Messages API takes it as a separate top-level system field and only user and assistant turns in messages. The Claude request is complete: the API requires model and max_tokens, and a user message, so the output always has them. The code output wraps the same request in curl or the official Python and TypeScript SDKs. For OpenAI the model id is left as a placeholder for you to fill in.
Specs and sources
Limits
- Plain substitution only: no loops, conditions, defaults or filters as in Jinja or Handlebars.
- Names with a dash ({{first-name}}) work here but not in Jinja or Handlebars, and a dot means a nested field there. Use underscores if the template will go into one of those.
- Saved templates live in this browser's local storage. Clearing site data removes them; export a template JSON to keep a copy.
- The token count is an estimate. Each model family has its own tokenizer.
- Values are inserted as typed. Nothing is escaped, so a value that itself contains {{braces}} stays in the output as text.
- A share link holds the whole template in the URL, so very long prompts make very long links. Anyone with the link can read the prompt and values.
Questions
- What is a prompt template?
- A prompt with fixed instructions and named gaps, such as {{topic}} or {{tone}}, that you fill in each time you use it. It keeps the wording that works and changes only the input.
- How do I add variables to a ChatGPT or Claude prompt?
- Write the name in double braces where the value should go, like {{product}}. The builder turns each name into a field and puts your value in its place in the finished prompt.
- Should variables use single or double braces?
- Double braces are the common choice because single braces appear in JSON and code inside prompts. Mustache-style template engines use {{name}}, and Anthropic's prompting guide writes inputs the same way.
- Where does the system prompt go in the Claude API?
- In the top-level system field of the Messages request, not as a message. The OpenAI Chat Completions API instead takes it as a message with the role system.
- How do I use a prompt template in code or LangChain?
- Pick Code to get a ready request for the Anthropic or OpenAI SDK with the values filled in. To render the template yourself, export the template JSON and replace each {{name}} in your code. LangChain's PromptTemplate uses single braces by default, so change {{name}} to {name} there, or use its mustache template format.
- Are there free prompt templates for ChatGPT and Claude?
- Yes. Start from a template lists nine general ones, such as summarise, extract to JSON and code review. They are plain starting points: change the instructions and variables to fit your task.
- Is my prompt stored or sent anywhere?
- Nothing is sent anywhere. The current draft and any templates you save are kept in your browser's local storage on this device. A share link only exists if you copy one, and then the prompt lives in that link.