Palindrome Checker
A palindrome is a word, phrase, number, or sequence of characters that reads the same forwards and backwards. Classic examples include 'racecar', 'madam', and the phrase 'A man, a plan, a canal: Panama'. This tool lets you verify any text instantly, with flexible options to ignore case differences, whitespace, and punctuation — so you can check both strict and relaxed palindromes.
Under the hood, the checker normalizes your input according to the selected options (lowercasing, stripping spaces and/or punctuation), then compares the result with its reverse. Both the normalized form and the reversed string are displayed side by side so you can see exactly how the comparison is made — useful for learning, word games, linguistic analysis, and coding exercises.
How it works
Normalize the input string S by applying the selected filters (lowercase, remove spaces, remove punctuation). Then check: isPalindrome = (S === S.split('').reverse().join('')). Time complexity: O(n) where n is the length of the normalized string.
Use cases
- Verifying palindromic words and phrases for word games or trivia
- Teaching string manipulation and reversal concepts in programming courses
- Checking whether numeric sequences or dates are palindromes
- Validating palindromic DNA sequences in bioinformatics exercises
- Creating and testing palindrome poetry or constrained writing challenges
Frequently asked questions
What is a palindrome?
A palindrome is a word, phrase, number, or sequence of characters that reads the same forwards and backwards. Classic examples include 'racecar', 'madam', and 'level'. Longer phrase palindromes such as 'A man, a plan, a canal: Panama' work only when you ignore spaces, punctuation, and capitalization.
Is 'racecar' a palindrome?
Yes. Reversing the letters of 'racecar' gives 'racecar', so it reads identically in both directions. The tool confirms this by displaying the normalized text next to its reverse so you can see the match directly.
How do you check if a number is a palindrome?
Read the digits in reverse and compare them with the original; if they match, the number is a palindrome. For example, 12321 reversed is still 12321, while 12345 is not. This checker treats numbers as character sequences, so you can paste any number to test it instantly.
Does the palindrome check ignore capital letters?
Only if you enable the ignore-case option, which converts everything to lowercase before comparing. With that option on, 'Madam' counts as a palindrome; with strict matching off it would fail because uppercase M and lowercase m differ. Separate options also let you ignore spaces and punctuation.
What is the longest single-word palindrome?
In English, 'tattarrattat', coined by James Joyce in Ulysses, is often cited at 12 letters, while the common dictionary word 'rotator' is a frequent example. The Finnish word 'saippuakivikauppias' is far longer at 19 letters. You can paste any of these into the checker to verify them.