Palindrome Checker
Last updated: 27 June 2026
Reviewed by Gavin Meiring, Lead research and primary author ยท Doctoral Candidate (Corporate Governance) ยท Research and drafting assisted by AI
racecar"- The longest palindromic word in English is 'tattarrattat' (12 letters), coined by James Joyce in 'Ulysses' (1922) to represent a knock on the door.
- The first known palindrome is the Latin 'SATOR AREPO TENET OPERA ROTAS' โ a 5ร5 square where the words read the same in any direction. It dates to Pompeii, around 79 AD.
- In music, a palindrome (or 'crab canon') sounds the same played backwards. Bach embedded several in his works. Beethoven's 'Fรผr Elise' contains a palindromic motif.
Palindrome Checker
A palindrome checker identifies whether a word, phrase, or sentence reads the same forwards and backwards. It is a useful tool for word game enthusiasts, puzzle makers, writers exploring wordplay, and teachers introducing the concept of palindromes to students.
How to Use the Palindrome Checker
- Type or paste the word or phrase you want to check into the input field.
- Choose whether to ignore spaces, punctuation, and capitalisation (most tools do this by default).
- Click the check button.
- The tool will display whether the input is a palindrome or not.
- If you entered a sentence, the result will typically show the cleaned version used for comparison.
The Formula
The algorithm strips the input of spaces and punctuation, converts all characters to the same case, then compares the resulting string to its reverse. In pseudocode:
- Remove all non-alphabetic characters and convert to lowercase.
- Reverse the cleaned string.
- Compare the original cleaned string to the reversed string.
- If they match, the input is a palindrome.
For example, the phrase "A man a plan a canal Panama" becomes "amanaplanacanalpanama" after cleaning, and reversing that string produces exactly "amanaplanacanalpanama". Because the two strings are identical, the phrase is confirmed as a palindrome.
Real-World Example
You are writing a quiz for a school activity and want to verify that "Was it a car or a cat I saw" is a genuine palindrome.
- Remove spaces and punctuation: "wasitacaroracatisaw"
- Reverse: "wasitacaroracatisaw"
- The strings match, so the phrase is confirmed as a palindrome.
You add it to the quiz with confidence.
Famous Palindromes Worth Knowing
Some of the most celebrated palindromes in English include "Madam, I'm Adam", "Never odd or even", and "Do geese see God". The longest known single-word palindromes include "racecar", "level", "civic", and "radar". Finnish has unusually long palindromic words, such as "saippuakivikauppias" (a lye soap dealer), which is often cited as the world's longest palindromic word in common use. Palindromic numbers, such as 121, 1331, and 12321, are also widely studied in mathematics.
Frequently Asked Questions
Does capitalisation matter when checking palindromes? By convention, palindromes are checked case-insensitively. The word "Madam" is treated as "madam" for comparison purposes. Most palindrome checkers apply this rule automatically.
Are spaces and punctuation included in the check? Standard palindrome checking ignores spaces and punctuation, treating only alphabetic characters. This means "A man, a plan, a canal: Panama!" qualifies as a palindrome even though it contains commas, a colon, and an exclamation mark.
Can numbers be palindromes? Yes. A number is a palindrome if it reads the same forwards and backwards, for example 121, 1001, or 9009. Some tools support numeric palindrome checking alongside text.
What is a word-unit palindrome? A word-unit palindrome is a sentence where the sequence of words, rather than letters, reads the same in both directions. For example, "First ladies rule the State and state the rule: ladies first."
What the cleaning step leaves behind
The formula section above says the input is stripped of everything but letters, converted to lower case, then compared against its own reverse. It is worth seeing what that does to a real phrase, because the cleaned string is the only thing the comparison ever sees. The tool shows it so you can check the input was read the way you expected.
| Phrase entered | Cleaned for comparison | Length | Palindrome |
|---|---|---|---|
| A man a plan a canal Panama | amanaplanacanalpanama | 21 | yes |
| Was it a car or a cat I saw | wasitacaroracatisaw | 19 | yes |
| Madam, I'm Adam | madamimadam | 11 | yes |
| Never odd or even | neveroddoreven | 14 | yes |
| Do geese see God | dogeeseseegod | 13 | yes |
| Rats live on no evil star | ratsliveonnoevilstar | 20 | yes |
| Step on no pets | steponnopets | 12 | yes |
| No lemon, no melon | nolemonnomelon | 14 | yes |
| Sums are not set as a test on Erasmus | sumsarenotsetasatestonerasmus | 29 | yes |
The cleaned strings are what make phrases like "Madam, I'm Adam" count. The apostrophe goes, the capital M becomes a lower case m, and eleven letters remain. A tool that skipped the cleaning step would fail the phrase on the punctuation alone, which is why the convention exists.
Where a near miss fails, and why it fails early
A palindrome check is a character-by-character comparison from both ends at once. The moment two characters disagree, the answer is settled and the rest of the string does not need reading. That is why a single wrong letter near the end of a phrase shows up as a failure at the first comparison.
| Input | Cleaned | Length | First disagreement, from the left | From the right |
|---|---|---|---|---|
| A man a plan a canal Panamo | amanaplanacanalpanamo | 21 | position 0 | position 20 |
| Was it a car or a cat I was | wasitacaroracatiwas | 19 | position 0 | position 18 |
| Do geese see Godd | dogeeseseegodd | 14 | position 1 | position 12 |
| Rats live on now evil star | ratsliveonnowevilstar | 21 | position 8 | position 12 |
| Step on my pets | steponmypets | 12 | position 4 | position 7 |
Positions are counted from zero. In the first row the last letter was changed from an a to an o, and the two ends stopped matching at once, because the check compares the first character against the last before it moves inward. In the fourth row the word "no" became "now", which added a letter in the middle and pushed the disagreement to position 8. That position is also the centre of the string, which is the signature of a length change rather than a substitution.
Letters only, or letters and digits
The page's formula says letters only, while the FAQ says numbers can be palindromes. Both are true, and a checker has to pick a rule. The two rules disagree on some inputs and on one class of input they disagree badly.
| Input | Letters and digits | Palindrome under that rule | Letters only | Palindrome under that rule |
|---|---|---|---|---|
| 121 | 121 | yes | nothing left | yes |
| 12.21 | 1221 | yes | nothing left | yes |
| 12345654321 | 12345654321 | yes | nothing left | yes |
| 4x4 | 4x4 | yes | x | yes |
| 9009 | 9009 | yes | nothing left | yes |
| A1B2B1A | a1b2b1a | yes | abba | yes |
| 1a2b3b2a1 | 1a2b3b2a1 | yes | abba | yes |
| A1BCB2A | a1bcb2a | no | abcba | yes |
| AB12BA | ab12ba | no | abba | yes |
Three rows in that table are worth reading twice. The pure number rows and 4x4 leave nothing or almost nothing behind under the letters-only rule, and an empty string is a palindrome by definition, so those inputs pass for a reason that has nothing to do with the input. A checker that accepts an empty cleaned string will report "yes" for a row of full stops. The last two rows are the genuine divergence: strip the digits from A1BCB2A and you get abcba, a clean palindrome, while keeping the digits gives a1bcb2a, which is not. The same input can be a palindrome or not depending on the rule, so the tool's behaviour on your input is worth checking before you rely on the answer.
How many palindromic numbers exist
Numbers are palindromes when they read the same in both directions, and counting them shows how sparse they become as the numbers grow. Palindromes are determined entirely by their first half, so the count grows by a factor of ten every two digits rather than every digit.
| Digits | Palindromic numbers in the range | Share of the range |
|---|---|---|
| 1 | 9 | 100% |
| 2 | 9 | 10% |
| 3 | 90 | 10% |
| 4 | 90 | 1% |
| 5 | 900 | 1% |
| 6 | 900 | 0.1% |
| 7 | 9,000 | 0.1% |
The one-digit row is every number from 1 to 9, so all of them qualify. From there the share falls by a factor of ten every two digits, which is why palindromic numbers feel common among small values and rare among large ones. There are exactly 90 three-digit palindromes and exactly 90 four-digit ones.
The reverse and add process
A related exercise takes a number, adds it to its own reverse, and repeats until the sum is a palindrome. Most numbers converge quickly, and the number of steps is a fact you can reproduce by hand.
| Start | Steps | Palindrome reached |
|---|---|---|
| 19 | 2 | 121 |
| 39 | 2 | 363 |
| 59 | 3 | 1111 |
| 69 | 4 | 4884 |
| 79 | 6 | 44044 |
| 89 | 24 | 8813200023188 |
Some numbers resist. Running the process from 196 for 300 steps produced no palindrome, and the value had grown to 133 digits by the end. The first steps are short enough to check on paper: 196 to 887, then 1675, then 7436, then 13783, then 52514, then 94039, then 187088. The process from 295 and from 394 joins the same sequence at 887, so all three share the same fate. Whether the sequence from 196 ever reaches a palindrome is an open question, which is why 196 is the smallest of the numbers known as Lychrel candidates.
The check on the page's own quiz phrase
The quiz phrase used in the example above is "Was it a car or a cat I saw". Removing the spaces gives wasitacaroracatisaw, which is nineteen characters long. Reversing that string produces wasitacaroracatisaw exactly, so the phrase is a palindrome and the quiz answer key is correct. Nineteen is odd, so the string has a true centre character: the o in "or", sitting at position 9 of 19 when the count starts at zero. The nine characters before it mirror the nine after it. As a check on the tool: enter the phrase with the last word changed to "was" and the tool should report no, with the cleaned string wasitacaroracatiwas, which differs from its reverse at both ends.
Also try these free tools: