Anagram Checker
Compare two strings to determine if they are anagrams of each other. See character frequencies, sorted forms, and generate new anagrams.
How to Use the Anagram Checker
- Check mode — Enter two strings in the input fields. The tool instantly shows whether they are anagrams, displays the sorted character forms, and renders a character frequency comparison table.
- Generate mode — Enter a single word and click Shuffle Again to see random letter arrangements.
- Reference mode — Browse a curated list of famous anagram pairs for inspiration.
What Is an Anagram?
An anagram is a word or phrase formed by rearranging all the letters of another word or phrase, using each letter exactly once. The word "anagram" itself derives from the Greek "ana-" (back, again) and "gramma" (letter). Anagrams have been used throughout history as wordplay, in cryptography, as pseudonyms, and as literary devices. Some of the most famous anagram pseudonyms include Voltaire (from "Arouet l.j." — his birth name François-Marie Arouet with Latin suffixes), and Tom Marvolo Riddle / "I am Lord Voldemort" from Harry Potter.
How Anagram Checking Works
The algorithm is elegantly simple. Both strings are sanitized by converting to lowercase and removing all non-alphabetic characters (spaces, punctuation, numbers). The remaining letters of each string are sorted alphabetically. If the two sorted strings are identical, the original strings are anagrams of each other. For example, "listen" sorts to "eilnst" and "silent" also sorts to "eilnst" — so they are anagrams. The character frequency table provides a more detailed view, showing how many times each letter appears in each string and highlighting any mismatches.
Anagrams in Word Games
Anagram detection is fundamental to word games like Scrabble, Words with Friends, and Jumble puzzles. In Scrabble, every valid play is essentially an anagram — rearranging your tiles plus existing board letters to form a legal word. Competitive Scrabble players spend significant time memorizing two-letter words and common anagram pairs. The Generate mode in this tool helps you explore possible arrangements of your letters, though it doesn't filter by whether the result is a real word.
Anagrams in Cryptography and Coding
Anagram checking is a classic coding interview problem. The optimal solution runs in O(n) time using a character frequency hash map, or O(n log n) using sort-and-compare. This tool uses the sort-and-compare approach for simplicity, with the frequency map built separately for the visual table. Anagram-like problems appear in many algorithmic contexts: detecting permutations, finding all anagram substrings in a string (sliding window technique), and grouping words into anagram clusters. Related tools: Palindrome Checker, Word Counter.