Randomly rearrange letters in a word or phrase

Generate random rearrangements of a short word while counting distinct permutations correctly.

freeworks offlinenothing uploaded
ToolLetter Shuffler
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Letters are randomized with Fisher–Yates shuffles and duplicate strings are removed until the requested limit is reached. The possible count uses the multinomial formula n! divided by each repeated letter count factorial, then excludes the unchanged input from the returned alternatives.

  • Repeated letters reduce the number of distinct arrangements.

Worked example

Shuffle a word
Generate letter permutations of a short word
Input
											listen
										
Output
												Anagrams: ielsnt, sitnle, snliet, tnslie, nsleti, nsteil, ilestn, setinl, neistl, senlit, lesint, ltinse, ltneis, tinlse, leinst, slitne, etilns, inltse, letnis, elsint
Total possible: 719
											

When to use this

Word games, anagram puzzles, and test data generation use shuffled letter arrangements.

Edge cases

  • A word such as balloon has fewer arrangements than 7! because repeated letters are interchangeable.
  • The unchanged input is excluded from alternatives.
  • Random sampling may not discover every valid arrangement when the requested limit approaches the total.