A fast, powerful, safe and lightweight scripting language and text templating engine for .NET.
dotnet add package Scriban
Available on NuGet — .NET Standard 2.0+
Try Scriban live! Edit the template or data and click Run (or press Ctrl+Enter) to see the output.
Hello World!
<ul>
<li>APPLE</li>
<li>BANANA</li>
<li>CHERRY</li>
</ul>
Scriban uses a custom Lexer/Parser with a full AST for blazing-fast parsing and low-allocation rendering. CPU and GC-friendly by design.
By default, no .NET objects are exposed unless explicitly allowed. You control exactly what is available to templates — perfect for user-facing scenarios.
Parse and render Liquid templates with Template.ParseLiquid. Migrate from Liquid to Scriban incrementally, or use both side by side.
Import .NET classes, delegates, or custom IScriptCustomFunction implementations. Use member renamers, filters, and template loaders to tailor the engine.
Full async/await support with Template.RenderAsync. Evaluate templates without blocking — ideal for web servers and cloud functions.
Variables, expressions, conditionals, loops, functions, pipes, objects, arrays — all the constructs you need for powerful templating and scripting scenarios.
using Scriban;
// Parse a template
var template = Template.Parse("Hello {{ name }}! You have {{ count }} messages.");
// Render with a model
var result = template.Render(new { Name = "Alice", Count = 5 });
// => "Hello Alice! You have 5 messages."
For more examples, see the Getting started guide.