Palindrome Checker

Palindrome Checker

Check if a Word or Phrase is a Palindrome

Please enter a word or phrase.

Find Longest Palindromic Substring

Please enter some text to search.

20 Famous Palindromes

racecarlevelcivic radarnoonrotor kayakdeedrefer repapermadamtenet A man, a plan, a canal: Panama Was it a car or a cat I saw? Never odd or even Do geese see God? Able was I ere I saw Elba Mr. Owl ate my metal worm Rise to vote, sir Step on no pets

Palindrome Checker – Is Your Word or Phrase a Palindrome?

A palindrome is a word, phrase, number, or sequence of characters that reads the same forwards and backwards, ignoring spaces, punctuation, and capitalization. Our palindrome checker instantly tells you whether any input is a palindrome, shows the cleaned version and its reversal, finds the longest palindromic substring in a longer text, and lists 20 famous palindromes for reference.

What Makes Something a Palindrome?

The standard definition of a palindrome ignores spaces, punctuation, and letter case. "A man, a plan, a canal: Panama" is a classic palindrome because once you remove everything except letters and lowercase them, you get "amanaplanacanalpanama" — which is identical forwards and backwards. This tool applies the same normalization before checking, so it correctly identifies phrase palindromes that include punctuation.

Types of Palindromes

  • Word palindromes: Single words like "racecar", "level", "civic", and "radar".
  • Phrase palindromes: Entire sentences like "Was it a car or a cat I saw?" or "Never odd or even".
  • Number palindromes: Numbers that read the same in both directions: 121, 1331, 12321.
  • Date palindromes: Dates like 02/02/2020 that read the same forwards and backwards.
  • Name palindromes: First names like "Anna", "Eve", "Bob", "Elle", and "Hannah".

The Algorithm: Finding the Longest Palindromic Substring

The longest palindromic substring is found using the expand-around-center algorithm, which runs in O(n²) time. For each character in the string, the algorithm expands outward in both directions as long as the characters match. This is done for both odd-length palindromes (single character center) and even-length palindromes (gap between two characters as center). The longest match found across all centers is returned. For large texts, the more advanced Manacher's algorithm runs in O(n) time, but the expand-around-center approach is sufficient for typical use and much simpler to understand.

Palindromes in Language and Culture

The word "palindrome" comes from the Greek words palin (back, again) and dromos (running, course). Palindromes have fascinated linguists, puzzle makers, and mathematicians for centuries. The most famous English palindrome is generally considered to be "A man, a plan, a canal: Panama," attributed to Leigh Mercer in 1948. In mathematics, palindromic primes (primes that are also palindromes, like 11, 101, 131) are an active area of recreational mathematics.

Frequently Asked Questions

Does the checker ignore spaces and punctuation?
Yes. The checker removes all non-alphanumeric characters and converts everything to lowercase before comparing forwards and backwards. This is the standard way to evaluate phrase palindromes.
Is a single letter or empty string a palindrome?
By mathematical definition, a single character string is a palindrome because it reads the same in both directions. An empty string is also technically a palindrome. The tool treats single characters as palindromes.
What is Manacher's algorithm?
Manacher's algorithm finds the longest palindromic substring in O(n) linear time by cleverly reusing previously computed palindrome information. It is more complex to implement than the expand-around-center method used here but is preferred for very large strings in production applications.
Are numbers checked for palindromes too?
Yes. Digits are treated the same as letters. Enter a number like 12321 and the tool will confirm it is a palindrome. Number palindromes appear frequently in mathematics and recreational puzzles.
What is the longest known palindrome sentence in English?
As of general knowledge, the longest verified palindrome sentence in English is Demetri Martin's 224-word palindromic poem, published in 2009. Creating long palindromes is a significant linguistic puzzle-making challenge.