Anagram Checker

–
Classic anagram pairs
listen / silent · dormitory / dirty room · the eyes / they see · funeral / real fun · eleven plus two / twelve plus one · a gentleman / elegant man · astronomer / moon starer
How the check works: each phrase is lowercased, stripped to letters and digits, and its characters are sorted - the two sorted sequences above the comparison are the proof you can read by hand. The method is the classic sort-and-compare anagram algorithm, built from the same string primitives any tutorial uses: see Array.prototype.sort() on MDN for the sorting step this page runs.
Word-play companions: the palindrome checker for the mirror family, the anagram checker's cousin the random word generator for raw material, the upside-down text maker for the visual kind of letter trickery, and the nickname generator for what to call the winner.

Type two words or phrases and this checks whether they are anagrams - the same letters, rearranged: 'listen' and 'silent', 'dormitory' and 'dirty room', 'the eyes' and 'they see'. Case and punctuation are ignored, because that is how anagrams are played.

Bottom line: the check is exact, not a guess. Each phrase is reduced to lowercase letters and digits, the characters are sorted alphabetically, and the two results are compared character by character - if the sorted sequences match, they are anagrams, full stop. Both sorted sequences are shown below the answer so you can see exactly why a near-miss fails: 'anagram' and 'nag a ram' (the classic joke anagram) share every letter, one 'a' apart from pretending otherwise.

The honest part: this page answers one question - are these two strings anagrams? It does not search a dictionary for words you could make (that is a solver, and it needs a word list this page deliberately does not carry). The sort-and-compare method shown here is also the standard programming interview question, which is why the implementation notes point at the same string methods any language tutorial uses.

How to use

  1. Type the first word or phrase, then the second - spaces, capitals and punctuation are all ignored automatically.
  2. Read the verdict: anagrams or not, with both sorted letter sequences displayed as the proof.
  3. Try the classics: listen/silent, dormitory/dirty room, eleven plus two/twelve plus one.

Frequently asked questions

What counts as an anagram?

Two phrases are anagrams when one can be formed by rearranging all the letters of the other, using each letter exactly once. The convention - followed here - ignores capitalization, spaces and punctuation: 'Astronomer' and 'Moon starer' are proper anagrams even though the second has different spacing. Length is the fastest sanity check: if the two phrases have different letter counts, they cannot possibly be anagrams, and this checker says so before you read further.

How does the checker decide?

The same way the classic algorithm does. Each phrase is normalized - lowercase, non-letters stripped - then its characters are sorted alphabetically: 'listen' becomes e-i-l-n-s-t, and so does 'silent'. Identical sorted sequences mean identical letter inventories, which is the definition of an anagram. This sort-and-compare approach is also a famous interview question precisely because it is simple, provably correct, and efficient compared to trying every possible rearrangement.

What are the most famous anagrams?

The canon leans on coincidences that feel like secrets: 'listen' and 'silent', 'the eyes' and 'they see', 'dormitory' and 'dirty room', 'funeral' and 'real fun'. The mathematician James Gleick's favorite style pairs math with wordplay - 'eleven plus two' rearranges into 'twelve plus one', an anagram that is also an equation. Writers from Voltaire to Dan Brown have used anagrams to hide names in plain sight, which is exactly the property that makes the checker useful when you suspect one.

Why doesn't this page suggest words for me?

Because a solver needs a dictionary. Listing every word that can be built from a set of letters requires a full word list (tens of thousands of entries) plus a search over its subsets - a different tool with different data. This page carries no word list and answers exactly one question precisely: whether the two phrases you supply use the same letters. For finding candidate words, dictionary-based solver sites exist; for verifying a suspected anagram, this check is the authority you want.

Related tools