Anagram Checker

Compare two strings to determine if they are anagrams of each other. See character frequencies, sorted forms, and generate new anagrams.

Enter two strings above to check if they are anagrams.

How to Use the Anagram Checker

  1. 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.
  2. Generate mode — Enter a single word and click Shuffle Again to see random letter arrangements.
  3. 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.

Frequently Asked Questions

An anagram is a word or phrase formed by rearranging all the letters of another word or phrase, using each letter exactly once. For example, "listen" is an anagram of "silent", and "astronomer" is an anagram of "moon starer".
The checker sanitizes both strings by removing non-alphabetic characters and converting to lowercase. It sorts the characters alphabetically and compares the sorted results. A character frequency table shows the count of each letter in both strings for detailed comparison.
No. The checker ignores capitalization, spaces, and punctuation. Only alphabetic characters are compared, so "A man a plan a canal Panama" and "amanaplanacanalpanama" are treated identically.
Generate mode scrambles the letters of your input to produce random anagram candidates. It shuffles the letters multiple times to show different arrangements — useful for word games like Scrabble and puzzle construction.
Famous anagrams include: "listen" / "silent", "astronomer" / "moon starer", "dormitory" / "dirty room", "conversation" / "voices rant on", and "the eyes" / "they see". The Reference tab shows a curated list of classic anagram pairs.