Text Tools
Palindrome Checker & Generator - Test & Create Palindromes
Check if any word, phrase, or sentence is a palindrome (reads the same forwards and backwards). Ignores spaces and punctuation. Also finds the longest palindromic substring and generates palindromes from a prefix.
Famous palindromes
- A man, a plan, a canal: Panama
- Was it a car or a cat I saw?
- Never odd or even
- Do geese see God?
- Madam, I'm Adam
- Step on no pets
- No lemon, no melon
- Race a car - no, race a car
- Eva, can I see bees in a cave?
- Mr. Owl ate my metal worm
What is a palindrome?
A palindrome is a word, phrase, number, or sequence that reads the same forwards and backwards. The term comes from the Greek palindromos, meaning "running back again". Spaces, punctuation, and capitalisation are conventionally ignored.
Classic examples
- Words: racecar, level, madam, kayak, civic
- Phrases: "Never odd or even", "Step on no pets"
- Sentences: "A man, a plan, a canal: Panama" - attributed to Leigh Mercer (1948)
How palindrome detection works
The checker removes all non-alphanumeric characters, converts to lowercase, then compares the string to its reverse. The longest palindromic substring feature uses an expand-around-centre approach that runs in O(n²) time.
Long and notable palindromes
Some of the most celebrated palindromic phrases in English:
- "A man, a plan, a canal: Panama" (21 alphanumeric characters)
- "Was it a car or a cat I saw?" (17 characters)
- "Never odd or even" (13 characters)
- "Do geese see God?" (12 characters)
- "Madam, I'm Adam" (attributed to a garden in Eden)
Numeric palindromes
- Palindromic numbers: 121, 1221, 12321, 1234321 - the pattern 1×10ⁿ + 1 often produces palindromes.
- Palindromic primes: primes that read the same forwards and backwards: 11, 101, 131, 151, 181, 191, 313, 353, 373, 383...
- Lychrel numbers: most numbers eventually become palindromes through the reverse-and-add process (e.g., 57 -> 57+75 = 132 -> 132+231 = 363). Numbers that never become palindromes are called Lychrel numbers. The first candidate is 196, which has been iterated over 700 million steps without producing a palindrome.
DNA palindromes
In molecular biology, a palindromic sequence is a double-stranded DNA sequence where the 5'->3' reading of one strand equals the 5'->3' reading of the complementary strand. For example, the EcoRI restriction enzyme recognition site is:
5'-GAATTC-3'
3'-CTTAAG-5' Reading either strand from 5' to 3' gives GAATTC - a palindrome in the biological sense. Restriction enzymes almost exclusively recognize palindromic sequences, which is why this concept is fundamental to molecular cloning and genetic engineering.