Palindrome Checker
Check if a Word or Phrase is a Palindrome
Find Longest Palindromic Substring
20 Famous Palindromes
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.
