1001Ferramentas
🎲 Generators

Spintax Expander

Expands spintax syntax {a|b|c} into every possible combination or N random variations, with nesting support and a total count.

Nesting is allowed: {Hi|{Hello|Hey}} there. Use \{ \| \} for a literal brace or pipe.

Everything runs in your browser: the text you paste never leaves the page.

How the count is calculated

Groups at the same level multiply: three greetings times four openings times two closings gives twenty-four texts. A nested group adds instead: in {Hi|{Hello|Hey}} the outer group is worth three options, not two, because the second alternative already carries a choice of its own. That is why the total climbs faster than it looks.

In random mode a seed makes the draw repeatable: the same seed with the same text always returns the same list, which is handy when you need to regenerate a batch you already reviewed. Leave the seed blank and every click gives a fresh sample.

Turn one message into dozens of versions

Spintax is the braces-and-pipes notation copywriters have used for years to keep several wordings in a single file. In {Hi|Hello|Hey} folks, {how are you|hope you are well}?, one line holds six different messages. This page reads that notation, shows how many combinations exist and hands back the variations ready to paste into an email sender or an ad spreadsheet.

The count grows by multiplication: four greetings, three openers and two closers give twenty-four texts, not nine. Nested groups add instead of multiplying, so {Hi|{Hello|Hey}} is worth three options rather than two. Writing a paragraph with six small groups while expecting thirty versions and finding a total above one thousand is a common surprise.

When the total explodes, random mode takes over: instead of listing everything, it draws the number of variations you asked for. The part few generators offer is the seed. Type campaign-01 there and the draw becomes deterministic, so the same text always returns the same list, which helps when you have reviewed thirty variations and need to regenerate the batch after fixing a comma.

Frequently asked questions

How do I write a literal brace?
Put a backslash in front of it. The input price \{fixed\} comes out as price {fixed} in the final variation instead of being read as a group. The same goes for the pipe, written as \|, which matters when the output really needs that character, as in Markdown tables.
Can an alternative be empty?
It can, and it is a handy trick. Writing {|, if you like} gives you two versions: one with nothing and one with the extra clause. That makes part of a sentence optional without duplicating the whole paragraph inside a group just to represent the shorter reading.
Why did I get fewer variations than I asked for?
With the drop-repeats option on, the draw throws away variations that already appeared. If the text only has eight possible combinations and you asked for twenty, the list stops at eight and the page tells you how many distinct ones exist. Add alternatives or turn off the deduplication.

Related Tools