Fill {{variables}} in prompt templates from JSON — live preview.
You are a senior dev. Explain closures to beginners in 100 words.
🧩 Supports both {{double}} (mustache-style) and {single} (f-string-style) placeholders — double braces replace first, so mixed templates behave predictably. Non-string JSON values are stringified. Everything stays in your browser.
Double-brace placeholders follow the mustache convention and replace first; single-brace placeholders follow Python f-string style. Mixing both is supported and predictable — doubles resolve before singles.
Paste a JSON object as the variable source; non-string values (numbers, arrays, nested objects) are stringified automatically. Missing variables are flagged by name rather than left as silent placeholders.
Iterating prompt wording through real API calls burns tokens on every typo. Filling locally first catches variable mismatches, wrong brace counts, and stray text instantly — the API only sees the final draft.
The same engine works for email templates, SQL skeletons, commit message formats — anywhere variable placeholders appear.
More tools you might find useful
Color-coded token boundaries with counts — see what models see.
Token count vs every model context limit, with headroom percentages.
CSV training rows → OpenAI chat-format JSONL, mapped and validated.
Embedding costs across models: dimensions, $/1M tokens, workload totals.