Combination Generator

List your items once and get every possible combination or permutation of them.

Online Combination Generator

Enter a list of items and this tool writes out every possible combination or permutation of them at the length you choose.
Perfect for pairing menus, code lists, team rotations and test cases, all without writing a formula or a script.


Try an example:

Or drop a text file here

0 items

Settings

Drops repeated input lines so every result appears exactly once. Turn it off to keep duplicates.

Estimated results: 0


Overview

The Combination Generator is a free online tool that turns a plain list of items into a complete list of results. You enter your items one per line, choose how many items should appear in each result, and the tool writes out every single possible grouping (a combination) or every single possible ordering (a permutation) of those items. It is useful whenever you would otherwise sit with a pen and paper trying not to miss a pairing: building drink-and-pastry menus, creating product or voucher codes, planning who works with whom, or listing every possible test case for a form. The tool is built with plain JavaScript and runs entirely in your browser — your list is never sent to any server, and the copy and download buttons let you take the results straight into a spreadsheet or document.


Combinations vs. Permutations

A combination is a group of items where the order does not matter. Pick any two drinks from Tea, Honey and Lemon and you get three combinations: "Tea, Honey", "Tea, Lemon" and "Honey, Lemon". "Tea, Honey" and "Honey, Tea" are the same combination, so it is listed only once.

A permutation is an arrangement where the order does matter. From the same three items, "Tea then Honey" is a different permutation from "Honey then Tea", because the sequence reads differently — think of a two-step recipe where adding honey first and brewing tea second is not the same as brewing tea first and adding honey last. With permutations of two from three items you therefore get six results, not three.

Same idea in numbers: take the items 1, 2 and 3 and ask for 2 items per result. Combinations give three results: "1, 2", "1, 3" and "2, 3", because "2, 1" is the same group as "1, 2". Permutations give six: "1, 2", "2, 1", "1, 3", "3, 1", "2, 3" and "3, 2", because every order is its own result. Try it with the example buttons above and you will see both lists side by side in seconds.

The difference in one example: suppose four runners — Elena, Marco, Priya and Tom — race for a gold, silver and bronze medal. Choosing who shares the podium is a combination: {Elena, Marco, Priya} is one group of three, regardless of who wins what. Deciding the full finishing order is a permutation: "Elena, Marco, Priya" (gold, silver, bronze) and "Priya, Marco, Elena" (gold, silver, bronze with Priya first) count as two different results. Same three runners, different question. That is exactly the switch you make with the Generate setting in the tool.


What this Tool Does

The tool reads your input as a list of items, one per line, and builds every result that matches your settings:

Combinations group the items: with 4 pizza toppings, 2 items per result and repetition allowed, you get the 10 possible topping pairs, from "Mushroom, Mushroom" to "Pepperoni, Basil". Permutations arrange the items: the same 4 toppings as a 3-step ordering give every possible stacking sequence. The repetition switch decides whether one item may appear more than once inside a single result, so "Espresso, Espresso" becomes a legal answer when you allow it. The separator controls how the items inside each result are joined, from "Espresso, Latte" to "EspressoLatte". Before generating, an estimate counter tells you exactly how many results your settings will produce, and a safety cap keeps the browser responsive by stopping at the first 50,000 results. Results arrive one per line in the Output box, ready to copy or download.


Features

Generate mode: combinations or permutations. Choose whether the order of items inside a result matters. With the items Espresso, Latte, Mocha and 2 items per result, combinations give 3 results ("Espresso, Latte", "Espresso, Mocha", "Latte, Mocha"), while permutations give 6 (each pair in both orders).

Items per result. Set how many items each result contains, from 1 up to 50. A list of 5 snacks with 3 items per result produces every trio; change the number to 2 and the same list produces every pair instead.

Allow repetition. Turn this on when an item may appear more than once in the same result. Before: with items A, B and permutations of 2 you only ever get "A, B" and "B, A". After: "A, A", "A, B", "B, A" and "B, B" all appear, which is handy for building codes like "KQQ" from the letters K, R and Q.

Separator. Pick how items inside a result are joined: comma + space, comma, space, pipe, nothing, or any custom string you type. The items Espresso, Latte become "Espresso, Latte" with comma + space, "Espresso | Latte" with the pipe, or "EspressoLatte" with nothing. This is ideal when the output feeds a spreadsheet column or a code list.

Remove duplicate items. Lists pasted from emails or notes often repeat entries, and repeated input items would produce repeated results. With the checkbox on, the input Latte, Mocha, Latte, Chai is treated as Latte, Mocha, Chai before generating, so every result appears exactly once.

Live estimate with a safety cap. The "Estimated results" counter updates as you type and shows the exact total before anything is generated. When the settings would produce more than 50,000 results, the estimate turns red and warns you; pressing Generate then builds the first 50,000 and tells you to lower the length or switch repetition off to see them all, so the page never freezes.

Live mode, file upload and export. Live mode (on by default) regenerates the output as you type or change a setting, with no button press needed. You can also upload or drop a .txt or .rtf file to fill the input list, and copy the results to the clipboard or download them as a text file.


FAQs

FAQ 1: My list has fewer items than the "items per result" setting. Why is the output empty?
Answer: Without repetition, a result of 3 items needs at least 3 different items in the input, so nothing can be generated. The tool tells you exactly this and suggests either entering more items or switching "Allow repetition" to Yes, which reuses items and works with any list size.

FAQ 2: Are "Espresso, Latte" and "Latte, Espresso" counted twice?
Answer: Not in combination mode: they are the same group, so only one is listed. In permutation mode they are two different arrangements and both appear. If you see twice as many results as expected, you are probably in permutation mode when you wanted combinations.

FAQ 3: Why does the tool stop at 50,000 results?
Answer: Generating millions of lines at once can freeze a browser tab. The estimate counter warns you before that happens, and generation is capped at the first 50,000 results with a clear message. Lower the items-per-result number or turn repetition off to bring the total under the cap.

FAQ 4: Does the tool remove duplicate items from my list?
Answer: Yes, the "Remove duplicate items" checkbox is on by default and drops exact duplicate lines (after trimming spaces) before generating. Uncheck it if your list intentionally contains repeated entries and you want them treated as separate items.

FAQ 5: Which separator should I choose?
Answer: Comma + space reads best on screen and in spreadsheets. Nothing suits code lists such as "KRQ". Space or pipe work well when the items already contain commas, and Custom... lets you join items with any string, like " + " or " and ".

FAQ 6: Is my list uploaded or saved anywhere?
Answer: No. The tool is built with plain JavaScript and runs entirely in your browser. Your items and results never leave your device and are not stored on any server.


Tools Worth Trying

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.