Derangements
List and count derangements — permutations where no item stays in its original position.
Derangements
Paste a list, one item per line, and get every permutation in which no item ends up back where it started — the classic "derangement" of combinatorics, also called a permutation with no fixed points. Three items give 2 derangements, four give 9, five give 44 — the tool computes the exact count (the subfactorial, written !n) before it lists anything, so the live tally always shows what you are about to generate.
The letters mode deranges the characters of a single word instead of list lines, which is a quick way to check whether an anagram exists where every letter moves. With repetition switches from a strict one-to-one reassignment to positional sequences, where a position may reuse any item except the one that started there — useful for exploring looser "nobody keeps their own seat" arrangements rather than a true bijection. Duplicate items are removed by default so a repeated line does not multiply the output; separators are configurable — comma, space, tab, nothing, or a custom string with \t escapes.
Subfactorials grow almost as fast as factorials, so the limit option caps how many rows print without touching the reported count — set it to a handful of examples for a 20-item list whose full count would otherwise be unprintable, or to 0 to list everything the output size allows. Past the 10 MB output limit even a capped request is refused, with the count in the message, instead of freezing the tab.
Typical uses: Secret Santa assignments where nobody draws their own name, seating or task rotations that must avoid a self-match, and combinatorics teaching examples. Everything runs locally — your list is never uploaded; copy the result, download it as .txt, or send it back to the input to chain another step.