Skip to content

Template Filler

Fill a Mustache template with data from JSON or CSV, for mail merge, config files or bulk text. Write placeholders such as {{name}}, sections such as {{#items}}...{{/items}} and conditionals, then paste the data. Each row of a CSV or each item of a JSON array produces one filled copy of the template.

Reset

Frequently asked questions

Which template syntax is supported?

Mustache: {{name}} for a value, {{user.email}} for nested values, {{#list}}...{{/list}} to repeat over a list or show a block when a value is set, {{^list}}...{{/list}} for the opposite, {{.}} for the current item and {{! comment}} for comments.

How does mail merge with CSV work?

The first row of the CSV holds the column names, and each further row fills the template once. A column called first name is used as {{first name}}. The copies are joined with the separator you choose, such as a blank line or a --- rule.

What JSON can I use?

An object fills the template once. An array of objects fills it once per item, like CSV rows. To render a list inside one template, put it in an object, such as {"items": [...]}, and use a section.

When is a section hidden?

A {{#name}} section is hidden when the value is missing, false, null, 0, an empty string or an empty list. An inverted {{^name}} section is shown in exactly those cases.

Is HTML escaped?

Only if you turn on HTML escaping. Then {{name}} escapes characters such as < and & while {{{name}}} and {{& name}} insert the value unchanged. Without it all values are inserted as they are, which suits plain text and email.

Are partials and lambdas supported?

No. Partials ({{> name}}) produce no output, and lambdas are not possible because the data is JSON or CSV. Everything else of the Mustache syntax works, including changing the delimiters with {{=<% %>=}}.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.