Prompt Template Tester
Mustache-flavored template syntax. Use {{var}} for substitution,{{#if c}}…{{/if}} for conditionals, and{{#each list}}…{{/each}} for loops.
Output appears here…Variables found
None
Missing bindings
All variables bound
About Prompt Template Tester
Test prompt templates with Mustache-flavored syntax before wiring them into your LLM application. Paste a template, provide variables as JSON, and see the rendered output alongside a report of which variables were bound and which are missing.
Supported syntax
{{var}}— simple substitution{{user.name}}— dotted path into nested object{{#if cond}}…{{/if}}— truthy conditional block{{#each list}}{{.}}{{/each}}— list iteration{{!-- comment --}}— ignored block
Pipeline
- LLM Token Counter — count tokens in the rendered prompt.
- LLM Cost Calculator — estimate cost for the rendered prompt length.
Frequently asked
- What template syntax does this tool support?
- Mustache-flavored syntax: {{var}} for simple substitution, {{user.name}} for dotted-path lookups into nested objects, {{#if condition}}…{{/if}} for truthy conditionals, {{#each list}}{{.}}{{/each}} for list iteration, and {{!-- comment --}} for ignored blocks. No partials, no HTML escaping (this is for LLM prompts, not web rendering).
- What happens to unbound variables?
- Missing variables are left as the original {{var}} placeholder in the output and listed in the "Missing bindings" panel. This makes it easy to spot which variables you forgot to provide without the render failing entirely.
- Can I use nested objects in variables?
- Yes — use dotted paths like {{user.name}} or {{config.model.temperature}}. The tool resolves the path against the JSON variables object. If any segment is missing, the variable is treated as unbound.
- Why use templates instead of f-strings or string concatenation?
- Templates separate the prompt structure from the runtime data, making prompts easier to version, review, and test. They also make it obvious which parts of a prompt are dynamic, which helps when debugging unexpected model behaviour caused by a variable containing unexpected content.
- Is my prompt text sent anywhere?
- No. Rendering happens entirely in your browser. Your prompt templates and variable values never leave your device.
Related Tools
LLM JSON Repair
Fix malformed JSON from ChatGPT, Claude, Gemini, and Llama output. Strips fences, comments, smart quotes, trailing commas.
LLM Cost Calculator
Calculate the cost of OpenAI, Anthropic, Google, Meta, and Mistral models per million tokens.
LLM Token Counter
Approximate token counts for ChatGPT, Claude, Gemini, and Llama. Counts characters, words, and tokens per family.
MCP Config Validator
Validate Model Context Protocol server configs for Claude Desktop, Cursor, and other MCP clients.
.gitignore Generator
Combine .gitignore templates for 30+ languages, frameworks, and Salesforce DX. Fully offline.
.env Editor
Edit, sort, dedupe, and convert .env files to JSON, YAML, and shell exports.