Sintax
A fast, dependency-aware template engine with a composable modifier pipeline.
Transform any value with a single expression. Chain modifiers, resolve variable dependencies automatically, and handle complex data structures - without writing transformation logic by hand.
{{ response | from:'json' | key:'orders' | filter:'status','paid' | pluck:'total' | sum | decimal:2 }}Pipe syntax
Chain 51 built-in modifiers to transform values in a single expression. Text, collections, dates, paths, money, and more.
Dependency resolution
Variables reference each other. Sintax figures out the order and resolves everything correctly - automatically.
Loops & conditionals
Iterate slices and maps with for/endfor blocks. Branch output with if/else/endif or inline ternaries.
Use cases
Workflow engines, API response transformation, config generation, and dynamic formatting.
The pipe syntax
Values flow left to right through a chain of modifiers. Each modifier takes the output of the previous step as its input:
{{ title | trim | lower | slug }}
→ "my-post-title"
{{ body | shorten:160 }}
→ "First 160 characters of the body..."
{{ csv_line | split:',' | join:' | ' }}
→ "value1 | value2 | value3"{{ users | filter:'active',true | sort:'name' | first | key:'email' }}
→ "[email protected]"
{{ orders | pluck:'total' | sum | decimal:2 }}
→ "1284.50"
{{ products | map:'sku' }}
→ { "SKU-001": {...}, "SKU-002": {...} }{{ file_path | dirname }}
→ "/usr/local/share"
{{ file_path | filename | ext-trim }}
→ "config"
{{ asset | ext-prepend:'min' }}
→ "app.min.js"{{ now | format:'YYYY-MM-DD' }}
→ "2026-04-16"
{{ now | format:'D, d M Y' }}
→ "Thursday, 16 Apr 2026"
{{ created_at | format:'H:i' }}
→ "14:30"Variables that reference each other
Unlike most template engines, sintax doesn't require a pre-resolved context. Define your variables in any order - sintax works out the dependencies and resolves them correctly.
env: "production"
prefix: "{{ env | upper }}"
db_url: "{{ prefix }}_database"
label: "Connected to {{ db_url }}"label → "Connected to PRODUCTION_database"Circular references are detected before resolution starts and reported as a clear error.
Safe fallbacks
The default modifier short-circuits an entire pipeline when a value is missing, making it easy to build expressions that degrade gracefully:
{{ config | from:'json' | key:'timeout' | default:30 }}
{{ user | key:'profile.avatar' | default:'https://example.com/default.png' }}
{{ tags | filter:'featured' | first | default:'general' }}default catches both missing variables and modifier errors - so a broken upstream value won't crash the whole expression.
Conditional output
{{ if is_admin }}Full access{{ else }}Limited access{{ endif }}
{{ count | gt:0 ? count : 'none' }}The eq, gt, gte, is, and not modifiers return booleans you can use directly in conditions or ternary expressions.
Loops
for ... in ... iterates over slices and maps. Bind a value, or both an index/key and a value:
{{ for item in cart }}
- {{ item.name }} × {{ item.qty }}
{{ endfor }}
{{ for i, name in users }}{{ i }}: {{ name }}
{{ endfor }}Inside the body, <v>_index, <v>_first, and <v>_last are auto-bound (and <v>_key for maps without an explicit key binding). Block tags on their own line are auto-trimmed; use {{- ... -}} for explicit whitespace control.
Modifier categories
Text
trim, upper, lower, replace, replace_pattern, slug, shorten, split, join, concat, lines, reverse, title, and more
Collections
filter, find, sort, first, last, key, map, merge, pluck, flatten, sum, wrap, has, is
Boolean
eq, gt, gte, not - produce true/false for conditionals and ternaries
Convert
json, yaml, from, markdown - serialize to or parse from JSON, YAML, and HTML/Markdown
Utilities
default, format, length, decimal, line-numbers
File System
dirname, filename, ext, ext-dot, ext-trim, ext-prepend
Money
currency - convert between currency units with a multiplier ratio
How is this guide?