What is Spintax?

Spintax (spin syntax) is a template language for turning one source into many genuinely unique variants of a text. You — or an AI — write the variation logic once; the engine renders thousands of distinct, deterministic outputs locally, at near-zero cost.

The Basic Idea

A spintax template is ordinary text with embedded variation markers. Each time it is rendered, the engine picks one option from each marker and produces a distinct output — but every choice is one you defined, so the result stays correct and on-brand rather than a probabilistic guess.

The simplest example uses curly braces and pipes:

{Hello|Hi|Hey} {world|everyone|there}

This single line produces 9 possible outputs: "Hello world", "Hi everyone", "Hey there", and so on. A real template with dozens of variation points can generate thousands or millions of unique variants from one source.

Why not just let AI write every page?

You could call a language model on every page, but that has three problems: it costs money on every request, the quality drifts, and — most importantly — the output is near-identical and easy to spot. Search engines increasingly flag low-effort, template-shaped AI text, and near-duplicate pages compete with each other and invite duplicate-content penalties.

Spintax takes the opposite path. You author the variation once and render locally: no per-page API call, deterministic output you can review, and — because every variant is a different combination you defined — content that is genuinely unique by construction. It stays distinct in search rather than reading as spun-out filler.

Beyond Simple Spinning

Modern spintax goes far beyond {a|b|c}. The full syntax includes:

  • Enumerations {a|b|c} — pick one option, with arbitrary nesting depth
  • Permutations [a|b|c] — pick N elements, shuffle, join with configurable separators
  • Variables %name% — reusable values defined with #set / #def or passed at render time
  • Conditionals {?VAR?then|else} — value-driven branching, not a coin flip
  • Plural agreement {plural N: one|few|many} — the correct noun form by count, locale-aware
  • Includes #include "slug" — embed one template inside another
  • Comments /#...#/ — author notes stripped from output
  • Post-processing — automatic capitalization, spacing, and punctuation correction

The full specification is in the syntax reference.

Spintax + AI: The Modern Workflow

Content teams already use AI as their default writing interface. The question is what happens after the AI writes.

The workflow is reverse-authored: you don't write every variant by hand. You write the final text once and add the variation markup last, so the engine executes your intent instead of guessing at it — reverse for the source, diverse for the output. That is how you create diverse content from a single, reviewable template.

So spintax inverts the usual AI model:

  1. Use AI to create a template once — a structured document with variation logic
  2. Validate it — syntax checking, preview, human review
  3. Render on-site — each output is a local string operation: no API call, no cost, no latency

The output is deterministic and depends only on the quality of the template, so a single asset captures your brand voice and variation strategy — and generates unique content safely and cheaply forever.

Use Cases

  • Content at scale — product descriptions, landing pages, FAQ blocks, and meta descriptions across many pages, each genuinely different
  • Localization — locale-specific variants from one template, with variables and locale-aware plurals
  • Multi-site & agency — reusable template packs; unique content per site, without the duplicate-content penalty near-identical pages invite
  • Email & messaging — subject-line and body variations for testing and personalization
  • QA & test data — varied, realistic content for staging environments

Getting Started

Read the syntax reference to learn the markup, or try it live in the playground — no install. To render in your own app, pick an engine by runtime: @spintax/core (JavaScript), spintax/core (PHP), spintax-core (Python), or the Free Pascal engine — all open-source, zero-dependency, MIT, and held to one shared corpus. WordPress users get the free plugin with an editor, caching, and field bindings. See all four engines.