String Permutation Generator
Generate all possible permutations of characters in a string. Enter any text and see every unique arrangement of its characters.
Input
Output
Readme
What is a permutation?
A permutation is an arrangement of elements in a specific order. Unlike combinations, where order doesn't matter, permutations consider every possible sequence of the same set of items as unique. For example, "ABC" and "CBA" are different permutations of the same three letters.
The number of permutations for a set of n distinct elements is calculated using factorial: n! (n factorial). This means 3 characters produce 6 permutations (3! = 3×2×1), while 5 characters produce 120 permutations (5! = 120). The growth is exponential—10 characters yield over 3.6 million unique arrangements.
How do string permutations work?
String permutations rearrange the characters of a text in every possible order. Given the string "AB", the permutations are "AB" and "BA". For "ABC", you get six arrangements: ABC, ACB, BAC, BCA, CAB, and CBA. Each character occupies every position exactly once across all permutations.
When a string contains duplicate characters, some permutations will repeat. For instance, "AA" only produces one unique permutation since swapping identical letters yields the same result.
Tool description
This string permutation generator creates all possible arrangements of characters in your input text. Simply enter a word, number, or any sequence of characters, and the tool instantly generates every unique ordering. The output displays one permutation per line, making it easy to review, copy, or use in other applications.
The tool includes safeguards to prevent browser slowdowns: inputs are limited to 10 characters, and generation stops at 10,000 permutations. A live counter shows exactly how many permutations were produced.
Examples
| Input | Output | Count |
|---|---|---|
| AB | AB, BA | 2 |
| 123 | 123, 132, 213, 231, 312, 321 | 6 |
| CAT | CAT, CTA, ACT, ATC, TCA, TAC | 6 |
| ABCD | ABCD, ABDC, ACBD, ACDB, ... | 24 |
| 12345 | 12345, 12354, 12435, ... | 120 |
Features
- Instant generation: Permutations appear in real-time as you type
- Live count display: Shows the total number of permutations generated
- One-click copy: Easily copy all results to clipboard
- Smart limits: Prevents performance issues with inputs over 10 characters
- Clean output format: Each permutation on a separate line for easy parsing
Use cases
- Password recovery: Generate all possible character arrangements for short passwords or PINs
- Word puzzles: Find all anagram possibilities for crosswords, Scrabble, or word games
- Combinatorics learning: Visualize and understand permutation concepts in mathematics
- Lock combinations: List all possible orderings for combination locks with known digits
- Algorithm testing: Generate test cases for sorting algorithms or string manipulation functions