User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
0 / 15
Max 15 characters. Case-sensitive. Spaces count.
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

About

An anagram is a rearrangement of every character in a source string to produce a new sequence. The number of distinct anagrams for a string of length n with repeated characters is given by the multinomial coefficient: n! divided by the product of each character frequency factorial. A 5-letter string with all unique characters yields 120 permutations. A 10-letter string yields 3,628,800. Miscounting or naive enumeration causes memory exhaustion and browser crashes. This tool uses Heap’s algorithm for exact enumeration on short inputs (≀ 8 characters) and Fisher-Yates random sampling for longer strings, with automatic deduplication for repeated letters.

Pro tip: strings with many repeated characters drastically reduce unique output count. The word β€œMISSISSIPPI” has 11 letters but only 34,650 unique anagrams instead of 39,916,800. This tool computes in a background thread to keep your browser responsive. Results are capped at 10,000 displayed entries for practical usability. Note: this tool generates character-level permutations. It does not filter for dictionary words.

anagram generator string permutations word scrambler anagram solver letter rearrangement text generator

Formulas

The total number of distinct anagrams (permutations) of a string accounts for repeated characters using the multinomial formula:

P = n!r1! β‹… r2! β‹… ... β‹… rk!

Where P = total unique permutations, n = total number of characters in the string, r1, r2, …, rk = frequency count of each distinct character, and k = number of distinct characters.

For exhaustive generation (strings ≀ 8 chars), Heap’s algorithm produces all n! permutations in-place with O(n!) time complexity. Duplicates are eliminated by inserting each result into a Set. For longer strings, the Fisher-Yates shuffle runs in O(n) per sample, generating random unique anagrams until the cap of 10,000 is reached or a stall threshold is hit.

Reference Data

String Length (n)All Unique: n!All Same Letter2 Repeated (e.g., AABB...)Approx. Compute Time
3613< 1 ms
42416< 1 ms
5120110< 1 ms
6720190< 5 ms
75,0401630< 20 ms
840,32012,520< 100 ms
9362,880115,120Random sampling mode
103,628,8001113,400Random sampling mode
1139,916,8001831,600Random sampling mode
12479,001,60017,484,400Random sampling mode
136,227,020,800164,864,800Random sampling mode
1487,178,291,2001726,485,760Random sampling mode
151,307,674,368,00017,264,857,600Random sampling mode

Frequently Asked Questions

A string of length 9 with all unique characters has 362,880 permutations. At length 10, it exceeds 3.6 million. Exhaustive enumeration at this scale consumes hundreds of megabytes of memory and can freeze or crash a browser tab. Random sampling via Fisher-Yates shuffle generates unique anagrams in O(n) time per sample, keeping memory usage constant regardless of string length.
Repeated characters dramatically reduce unique outputs. The formula divides n! by the product of each character's frequency factorial. For example, "AABB" (n=4) yields 4!/(2!Β·2!) = 6 unique anagrams, not 24. The tool automatically detects and deduplicates, so you always see only distinct results.
Yes. "A" and "a" are treated as distinct characters. The string "Aa" produces 2 anagrams: "Aa" and "aA". If you want case-insensitive anagrams, convert your input to a single case before generating.
Yes. Spaces, digits, punctuation, and Unicode characters are all valid input characters. A space is treated as a character like any other, so "a b" (3 characters including space) yields 6 permutations: "a b", "ab ", " ab", " ba", "b a", and "ba ".
Rendering tens of thousands of DOM elements degrades browser performance. The cap of 10,000 balances completeness with responsiveness. The tool always displays the theoretical total count calculated from the multinomial formula, so you know the full scale even when display is capped.
No. This tool performs character-level permutation, not dictionary lookup. Every output is a valid rearrangement of your input letters, but most will not be meaningful words. For dictionary-filtered anagrams, you would need to cross-reference results against a word list, which is a different tool category.