Template
Use {a|b|c} for choices. Nesting {a|{b|c}} and escapes \{ \| \} work too.
Combinations
A dynamic-prompt expander for when you want to try every combination of a few choices in Stable Diffusion or NovelAI — eye color × expression × composition, and so on. Write choices with the `{a|b|c}` syntax (e.g. `{blue|green|red}`) and this tool generates every permutation, one combination per line. It handles **nesting** like `{a|{b|c}}`, and you can **escape** braces and pipes as literal characters with `\{` `\|` `\}`. It's handy for previewing what AUTOMATIC1111's Prompt matrix, the Dynamic Prompts extension, or wildcards will produce before you run them, or for generating strings for an X/Y/Z plot. Toggle **deduplication** and **tidy** (collapse stray spaces and commas left by swapped-in choices), and cap the output (100–5000) so an explosive count like `3^10` won't freeze the browser (it shows the total, how many are shown, and the number of variant groups). It works on plain text only — no images, no dictionaries, no external API. Your input is never sent to any server; all processing happens locally in your browser.
How to use
- In the template box, write the choices you want to try using the `{a|b|c}` form (e.g. `masterpiece, {1girl|1boy}, {blue|green|red} eyes`). Nesting `{a|{b|c}}` works too.
- Every combination appears on the right, one per line, automatically. The total, the number shown, and the variant-group count are displayed below.
- Adjust 'remove duplicates', 'tidy spaces & commas', or the max count, then 'Copy all' to grab the results.
FAQ
Is the prompt I type uploaded to a server?
No. Expansion is pure text processing done entirely in your browser, with nothing sent to any external API or server. There are no images and no external dictionaries — your input is processed only on your device.
How do I write the `{a|b|c}` syntax?
Separate choices with a pipe `|` inside braces. For example `{blue|green|red} eyes` expands to three lines: 'blue eyes', 'green eyes', 'red eyes'. You can also nest, like `{a|{b|c}}`, and each choice expands further.
How do I output braces or pipes as literal characters?
Escape them with a backslash: `\{` `\|` `\}`. Escaped characters aren't treated as choice delimiters and are emitted as-is in the output.
Is it OK if the combinations explode?
You can cap the output (100–5000), so even an explosive total like `3^10` won't freeze the browser. It shows both the total and how many were actually displayed, so you can tell when the cap was hit — raise the limit to see more.
Is this the same as AUTOMATIC1111's Prompt matrix or Dynamic Prompts?
The idea is close: you write choices with `{a|b|c}` and get every permutation. But this tool needs no extension install — use it to sanity-check how the syntax behaves, or to build strings for an X/Y/Z plot, right in the browser. Paste the output straight into your UI.
What do dedupe and tidy do?
'Remove duplicates' collapses lines that end up identical after expansion into one. 'Tidy spaces & commas' cleans up stray spaces and repeated commas left when choices are swapped in, giving you a readable single line. Both are optional toggles.