Scriban

Scriban - Fast, powerful text templating for .NET

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.

Checking service availability…

Hello World!
<ul>
  <li>APPLE</li>
  <li>BANANA</li>
  <li>CHERRY</li>
</ul>

By default, no .NET objects are exposed unless explicitly allowed. You control exactly what is available to templates - perfect for user-facing scenarios.

Runtime & security · Safe runtime

Parse and render Liquid templates with Template.ParseLiquid. Migrate from Liquid to Scriban incrementally, or use both side by side.

Liquid support

Import .NET classes, delegates, or custom IScriptCustomFunction implementations. Use member renamers, filters, and template loaders to tailor the engine.

.NET runtime API · Custom functions

Full async/await support with Template.RenderAsync. Evaluate templates without blocking - ideal for web servers and cloud functions.

Getting started · Runtime API

Variables, expressions, conditionals, loops, functions, pipes, objects, arrays - all the constructs you need for powerful templating and scripting scenarios.

Language reference · Examples

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.