Template To Liquid API
https://api.findutils.com/api/tools/template-to-liquid/execute Convert a Handlebars, Mustache or Knap template into Shopify Liquid. Blocks become if/unless/for, Handlebars scopes (this, ../, #with, block params) are resolved to Liquid paths, @index and loop.* become forloop.*, Knap elseif becomes elsif, Knap colon arguments become comma arguments, dayjs date formats become strftime, the ?? fallback becomes | default, helpers with arguments become filters, partials become render tags, and comments become comment blocks. Handlebars and Mustache HTML-escape outputs by default, so their {{ }} outputs gain | escape unless escape_output is false; Knap writes Markdown and gets none. Every construct with no Liquid form (helpers, @key, not inside a compound condition, Markdown-only Knap filters) is kept as written and listed in warnings with its line, never dropped silently. Jinja2, Twig and Nunjucks templates are refused, not half-converted. Auto detects the dialect. The browser page at /developers/json-to-liquid/ previews the result with LiquidJS.
Request body
application/json-
template
string required
The template text.
-
from
string optional
The source dialect. auto (default) detects it from the tags used. One of
auto · handlebars · mustache · knap. Default"auto". -
escape_output
boolean optional
Add | escape to plain {{ }} outputs, matching the source engine's default HTML escaping. Default: true for Handlebars and Mustache; false for Knap, which writes Markdown.
Example arguments
Verified{
"template": "<h1>{{title}}</h1>{{#each items}}<li>{{name}}</li>{{/each}}"
} More Calculators tools
- Bmi Calculate Compute Body Mass Index (BMI) with metric (kg/cm) or imperial (lb/in) units.
- Body Fat Calculator Estimate body fat percentage, fat mass, lean mass, BMI, and a body-composition category.
- Calorie Calculator Work out how many calories to eat per day to lose, maintain, or gain weight.
- Carbon Footprint Calculator Estimate an annual personal carbon footprint in tonnes of CO2 from home energy, transportation, and lifestyle, with a per-category…
- Chmod Calculate Convert between numeric (755) and symbolic (rwxr-xr-x) Unix file permissions.
- Cloudflare Cost Calculate Estimate monthly Cloudflare developer platform costs (Workers, D1, R2, KV, Durable Objects) under free or $5 Workers Paid plans.