What Is a Palindrome? Definition, Examples, and How to Check
A palindrome reads the same forwards and backwards. Learn the definition, famous examples, and how to check any word, phrase, or number online.
ToolNest Team
March 17, 2026
What Is a Palindrome?
A palindrome is a word, phrase, number, or sequence that reads the same forwards and backwards — ignoring spaces, punctuation, and capitalisation.
Single-word examples:
- racecar
- level
- radar
- civic
- kayak
- noon
- madam
Phrase examples:
- "A man, a plan, a canal: Panama"
- "Was it a car or a cat I saw?"
- "Never odd or even"
- "Do geese see God?"
Number examples:
- 121
- 1001
- 12321
- 11011
How a Palindrome Checker Works
A palindrome checker algorithm:
- Convert the string to lowercase
- Remove all non-alphanumeric characters (spaces, punctuation)
- Compare the cleaned string to its reverse
- If they match — it's a palindrome
In code:
function isPalindrome(str) {
const clean = str.toLowerCase().replace(/[^a-z0-9]/g, '');
return clean === clean.split('').reverse().join('');
}
Check Any Text Online
- Open Palindrome Checker on ToolNest
- Type or paste your word, phrase, or number
- The result appears instantly — Palindrome ✓ or Not a palindrome ✗
- The checker ignores spaces and punctuation automatically
Types of Palindromes
Word palindromes: A single word that reads the same backwards — racecar, level, deed.
Phrase palindromes: A full sentence that reads the same (ignoring spaces and punctuation) — "A man, a plan, a canal: Panama".
Number palindromes: Numbers that read the same digits forwards and backwards — 121, 9009.
Date palindromes: Dates that read the same in a certain format. For example, 02/02/2020 reads as 02022020 in either direction.
Semordnilap: A word that spells a different word backwards. "desserts" → "stressed". These are the opposite of palindromes.
Famous Palindromes in History
"Able was I, ere I saw Elba" — attributed to Napoleon Bonaparte, reflecting on his exile to the island of Elba.
"Madam, I'm Adam" — supposedly Adam's first words to Eve.
"Sator Arepo Tenet Opera Rotas" — a Latin palindrome square from ancient Rome, each row and column reads identically.
Palindromes in Computer Science
Palindrome detection is a classic computer science problem used to teach:
- String manipulation
- Two-pointer techniques
- Dynamic programming (longest palindromic substring)
The longest palindromic substring problem — finding the longest palindrome inside a larger string — is solved efficiently using Manacher's algorithm in O(n) time.
Related Tools
- Reverse Text — reverse any text string
- Mirror Text — flip text horizontally for a mirror effect
- Word Counter — count characters in your text
Share this article