Overview
Introduction
Some problems, like checking every possible combination of settings or ingredients, require looking at every subset of a list, not just the list itself.
This tool generates that complete powerset for you, one subset per line, so you can scan or copy every combination at once.
What Is List Powerset Generator?
A generator for the mathematical powerset of a list: every possible subset of its items, from the empty set up to the full list.
Because the number of subsets doubles with every item (2^n for n items), input is capped at 12 items to keep the output a manageable 4096 lines at most.
How List Powerset Generator Works
Each integer from 0 to 2^n - 1 is treated as an n-bit mask; bit i being set means item i is included in that subset.
For every mask, the included items are collected in original order and formatted as "{ item1, item2 }", with the empty set rendered as "{ }".
When To Use List Powerset Generator
Use it to enumerate every possible combination of a small set of options, features, or ingredients for testing or menu planning.
It's also a quick way to sanity-check combinatorics homework or explain what a powerset looks like concretely.
Often used alongside List Reducer, Sublist Extractor and List Splitter.
Features
Advantages
- Produces the complete, correctly-ordered powerset with no missing or duplicate subsets.
- The 12-item cap protects you from accidentally generating an unmanageable number of lines.
- Works with any separator, so short comma-separated lists are just as easy as newline-separated ones.
Limitations
- Capped at 12 items; larger lists must be split first (try Sublist Extractor) or reduced before generating a powerset.
- Does not deduplicate subsets when the input list itself contains duplicate items, so duplicate items produce visually duplicate subsets.
Examples
Best Practices & Notes
Best Practices
- Keep lists short (well under the 12-item cap) since even 10 items already produce 1024 subsets to scan through.
- Deduplicate your input list first if repeated items would make the subset list confusing.
Developer Notes
Subsets are generated with a bitmask loop from 0 to 2**n - 1 and a bitwise AND (mask & (1 << i)) to test inclusion, an O(n * 2^n) approach that's simple and exact for the capped input size.
List Powerset Generator Use Cases
- Enumerating every combination of a small number of feature flags or settings for test coverage
- Listing every possible ingredient combination for a small recipe or menu
- Teaching or demonstrating what a mathematical powerset looks like
Common Mistakes
- Trying to run a large list (say, 20 items) through the tool and expecting it to work; it will refuse above 12 items on purpose.
- Confusing a powerset (every possible subset) with permutations (every possible ordering).
- Not accounting for the empty set, which is always the first line of output.
Tips
- Start with a short 2-3 item list to see the pattern before scaling up to your real list.
- Copy the output into a spreadsheet if you need to sort or filter the subsets afterward.