Fill {{placeholders}} / ${vars} in a template from JSON values.
The Template String with Values tool fills a template with data from a JSON object. It recognises {{key}} and ${key} placeholders, supports nested paths such as user.name and array indexes, and tells you which keys were missing. Use it to preview messages, email text and log formats.
A template is text with named holes that are filled from data. Mustache and Handlebars style templates use double curly braces, while JavaScript template literals use a dollar sign and braces. Rendering means looking up each name in a set of values and substituting it. Names can be paths: user.name reads the name property of the user object, and items[0] reads the first array element. Previewing a template against real values is helpful when writing notification text, emails, prompts or log lines, because mistakes such as a misspelled key are obvious. This tool is a simple substitution engine, not a full template language. It has no loops, conditions or helpers, and it never evaluates JavaScript. Values are inserted as plain text.
No. It only substitutes values. For loops and conditions use a template engine such as Handlebars or Jinja.
No. The text inside the braces is only used as a key to look up, never executed.
No. Values are inserted as text without escaping. If you render the result as HTML, escape the values first.
Use items[0] or items.0. Both read the first element.
No. Rendering happens in the page and your template and values stay on your device.