What Is a Palindrome? How to Check Any Word or Phrase
"Racecar," "level," "madam" — palindromes read the same forwards and backwards. They're a fun bit of wordplay and a classic programming exercise. Here's the idea.
The definition
A palindrome is a word, phrase or number that's identical reversed. For phrases, you usually ignore spaces, punctuation and capitalization — so "A man, a plan, a canal: Panama" counts. Numbers can be palindromes too (12321).
How to check
Strip out spaces and punctuation, lowercase everything, then compare the string to its reverse. If they match, it's a palindrome. It's a one-liner in most programming languages, which is why it's a popular interview question.
Check instantly
Our free palindrome checker tests any word or phrase. To reverse text for other reasons, the backwards text generator does that.
Bottom line
A palindrome reads the same both ways once you ignore spaces, case and punctuation. Reverse the cleaned string and compare — that's all there is to it. A checker confirms tricky phrases instantly.