🔁 Words · Numbers · DNA · Batch Mode

Palindrome Checker

Test any word, phrase, number or DNA sequence for symmetry. Choose character mode (ignores spaces and punctuation), word mode, numeric mode or the DNA reverse-complement check. There is also a longest-palindrome finder and a batch checker.

Updated: August 24, 2026 Built by Khalil Rahman 100% client-side Free forever

Type or paste anything. The result updates as you type, and you can switch between character, word, numeric and DNA modes without losing what you entered.

✅
"A man, a plan, a canal, Panama" is a palindrome
Cleaned: amanaplanacanalpanama
Original: 30 chars Cleaned: 21 chars Words: 6
YES ✓
Characters: 0 Cleaned: 0 Words: 0 Unique chars: 0
Try one:

Paste any block of text and this finds the longest palindromic substring inside it. Useful for puzzles, DNA analysis and code challenges. Runs in O(n²) which is fast enough for anything you will paste here.

Check many lines at once. One word or phrase per line. Perfect for word lists, homework, puzzle solving or testing a batch of candidate names.

Your last 40 checks, stored on your own device. Click an entry to load it back into the checker. Nothing leaves your browser.

No checks yet.

What a palindrome actually is

A palindrome is a word, phrase, number or any other sequence that reads the same backwards as forwards. The simplest examples are single words: racecar, level, kayak, civic, madam. Reverse any of them and you get the same letters back.

Phrases are where it gets interesting. The famous one is A man, a plan, a canal, Panama, which has been circulating since the 1940s and still gets trotted out whenever palindromes come up. To make it work you have to ignore the spaces, the commas and the capital letters — which is exactly what the Character mode in this tool does. If you want the strict version where every character counts, including the spaces, the tool has that too, and almost nothing qualifies.

Numbers are palindromes in the same way. 12321, 45654 and 1000001 all read the same in both directions. Dates can be palindromes too — 02/02/2020 and 22/02/2022 are both famous examples from recent years, which is why they generate a small flurry of social media posts every time they come around.

How the checker works (the simple version)

The algorithm is genuinely simple, and understanding it makes the tool's behaviour much less mysterious.

  1. Normalise the input. In character mode, we strip everything that is not a letter or a digit, and convert to lowercase. So "A man, a plan, a canal, Panama" becomes amanaplanacanalpanama.
  2. Reverse the cleaned string. A single pass from the end to the start, swapping the characters into a new string.
  3. Compare the two. If the cleaned string and the reversed string match character for character, the original is a palindrome.

That is the whole thing. On a modern computer this runs in the time it takes you to read this sentence, even on text hundreds of thousands of characters long.

💡 Why we round the character count. The original character count includes spaces and punctuation. The cleaned count does not. If the two numbers differ a lot, you were working with a long phrase rather than a single word, and the palindromic quality depends heavily on the normalisation rules.

Types of palindrome

Not all palindromes behave the same way. Four main types show up in practice, and the tool handles all four as separate modes.

Type Example What makes it special
Word palindrome racecar Each letter mirrors around the middle. The simplest and most common form.
Phrase palindrome A man a plan a canal Panama Spaces, punctuation and case are ignored so that the whole phrase reads both ways.
Numeric palindrome 12321 Digits read the same forwards and backwards. Sometimes also true of dates.
DNA palindrome GAATTC Reads as its own reverse complement — the pairing on the opposite strand mirrors it.

Word-level palindromes

Word mode is different from character mode and much stricter. Each individual word in the input must itself be a palindrome. So "racecar level kayak" passes word mode because all three words qualify, even though the whole phrase is obviously not a character palindrome. This is useful for checking word lists where you want to know which entries are palindromes, not whether a phrase is.

DNA palindromes

In molecular biology a palindromic sequence is one where the complementary strand reads the same when you flip its direction. Take the six-base sequence GAATTC. Its complement, base for base, is CTTAAG — and if you read that complement backwards, you get GAATTC again. That is the reverse complement property, and it is why restriction enzymes like EcoRI can recognise the site and cut it symmetrically. Real palindromic sequences in genomes are often longer than six bases and can span dozens of nucleotides.

Palindromes in mathematics

Palindromic numbers have their own small corner of recreational mathematics, and the results are genuinely surprising.

Any single-digit number is trivially a palindrome. So is 11, 22, 33 and so on up to 99. There are exactly 9 one-digit palindromes, 9 two-digit ones, 90 three-digit ones, 90 four-digit ones, 900 five-digit ones, and the pattern continues with powers of ten.

The 196 algorithm

The "reverse and add" process is a simple game. Take any number, reverse its digits, and add the two together. Repeat with the result until you get a palindrome. Most numbers reach one within a handful of steps. Take 68 as an example:

Three steps and you are done. But some numbers stubbornly refuse. They are called Lychrel numbers, after a name coined by the mathematician Wade VanLandeghem in the 1980s. The smallest suspected Lychrel number is 196, and despite decades of computation — hundreds of millions of iterations have been tried — nobody has proved whether 196 ever terminates. It is one of the smallest unsolved questions in number theory.

Palindromic primes and squares

A palindromic prime is exactly what it sounds like: a prime number that is also a palindrome. The smallest ones are 2, 3, 5, 7, 11, 101, 131, 151, 181, 191. There are infinitely many suspected, but proving it is difficult. Palindromic squares are similar — 121 (11²), 484 (22²), 676 (26²), 10201 (101²). These are sometimes used in recreational programming challenges.

Famous palindromes

Some palindromes have been repeated so often they have become part of the language. These are the ones that keep coming up.

Palindrome Notes
A man, a plan, a canal, PanamaAttributed to Leigh Mercer in 1948. The most famous English-language palindrome in the world.
Never odd or evenShort, clean and often taught in schools as an introduction to the concept.
Was it a car or a cat I saw?Popularised in the 19th century. Works in both English and other languages with minor spelling changes.
Madam, I'm AdamReputedly the first words spoken by Adam to Eve, according to a long-running joke.
Taco catA modern favourite, probably because "taco" and "cat" are both short, common words.
Step on no petsFive words, none of them unusual, all fitting into a clean palindrome.
Do geese see God?Works as a question and as a palindrome, which is unusual.
Doc, note: I dissent. A fast never prevents a fatness. I diet on cod.One of the longest commonly quoted English palindromes at 72 characters after normalisation.
tattarrattatCoined by James Joyce in Ulysses. At 12 letters it is the longest single palindromic word in common English usage.
saippuakivikauppiasFinnish for "soapstone seller", widely cited as the longest palindromic word in any language at 19 letters.

The Finnish word is a genuinely useful one to remember, because it holds the Guinness World Record for the longest palindromic word in everyday use, and unlike most record-holders it is not a technical term or a contrived construction. It really is what you call someone who sells soapstone.

Where palindromes show up in real life

🧬

Molecular biology

Restriction enzymes cut at palindromic DNA sequences, which is the basis of most genetic engineering techniques.

🧩

Puzzles and games

Crosswords, word games and competitive programming problems all use palindrome checks constantly.

🎓

Teaching programming

Palindrome detection is one of the classic beginner exercises, and a good one for learning string manipulation.

📅

Palindromic dates

Some dates read as palindromes in certain formats, which is why 02/02/2020 generated worldwide news coverage.

📖

Literature and poetry

Constrained writing has produced whole poems and novels built around palindromic structures.

🔢

Recreational maths

Lychrel numbers and palindromic primes remain active research topics in number theory.

Common mistakes when checking palindromes

Forgetting to normalise

The single most common error is comparing raw characters. "A man a plan a canal Panama" fails if you include spaces and capital letters, but every reference work agrees that it is a palindrome. The normalisation step — lowercasing and stripping non-alphanumeric characters — is what makes phrase palindromes work, and skipping it will give the wrong answer on almost every famous example.

Confusing "palindrome" with "anagram"

An anagram rearranges letters into a different word. A palindrome does not rearrange anything — it just reads the same both ways. They are completely different properties, and mixing them up is common in school essays.

Assuming every number becomes a palindrome

Almost all do, but 196 is the most famous suspected exception. If someone tells you that the reverse-and-add process always terminates, they are wrong — that is an open problem.

Overlooking word boundaries in word mode

In word mode, the check is per word, not per phrase. "racecar level" is not a character palindrome because racecarlevel reversed is levelracecar, but it is a word-mode palindrome because each word individually qualifies. If you are looking for one specific type, make sure you are in the right mode.

⚠️ Punctuation inside a word matters for the strict rule. Words like "don't" and "isn't" contain apostrophes. In character mode we strip them, so "don't nod" becomes dontnod, which is a palindrome. In strict mode the apostrophe stays and the answer is different. The mode picker tells you which rule is being applied.

Your privacy and how we handle data

Nothing you type is sent anywhere. Every check runs as JavaScript in your browser. There is no server-side component, no account, and no logging. If you paste something confidential into the checker, it stays on your own device.

History stays on your device. Recent checks are stored in your browser's localStorage so they survive a page refresh. They are visible only to you, and clearing your browser data removes them permanently.

Cookies and advertising. Advertising and analytics cookies are switched off by default. They only turn on if you press Accept all, or select them individually under Manage preferences. You can change your choice at any time from the Cookie Policy page. Full details are in our Privacy Policy.

About the author

Khalil Rahman — Front-end developer and tool builder

Khalil has spent the last eight years building browser-based text and developer tools. He built this palindrome checker after finding that every other one online either could not handle DNA sequences, refused to check large numbers, or lost your input the moment you switched tabs. The word, numeric and DNA modes exist because he kept needing them himself while helping friends study for computer science exams. He maintains the SkillsInsider text toolset and writes the site's programming and language guides.

More about SkillsInsider · Editorial policy · Report an issue

Frequently asked questions

What is a palindrome?

A palindrome is a word, phrase, number or sequence that reads the same forwards and backwards. Spaces, punctuation and capitalisation are normally ignored for phrases, which is why "A man, a plan, a canal, Panama" is a palindrome despite containing commas and capital letters. The classic single-word examples are racecar, level, kayak, civic and madam.

Why does the tool ignore spaces and punctuation?

Because that is the standard definition of a phrase palindrome. Without this rule, virtually no famous palindromic phrase would qualify, and the whole category of phrase palindromes would be pointless. Some purists prefer the strict character-level reading, and the tool offers that mode separately, so you can see exactly how much difference the normalisation makes.

What is a DNA palindrome?

In genetics a palindromic sequence is one that reads as its own reverse complement. Take GAATTC: its base-for-base complement is CTTAAG, and reading that complement backwards gives you GAATTC again. That is why restriction enzymes can recognise the site and cut it symmetrically. Genuine palindromic sequences in real genomes are often longer than six bases and can span dozens of nucleotides.

Is there a longest possible palindrome?

No. In theory a palindrome can be any length, because you can always keep extending it. In practice the longest single English-language palindromic word in common use is "tattarrattat" at 12 letters, coined by James Joyce, and the longest palindromic word in any language is the 19-letter Finnish "sappuakivikauppias". The Longest Finder tab finds the longest palindromic substring inside whatever text you paste.

Do all numbers eventually become palindromes?

Most do, but not all — and this is genuinely an open mathematical question. The reverse-and-add process turns most numbers into palindromes within a handful of steps. Numbers that refuse are called Lychrel numbers, and 196 is the smallest suspected example. Despite decades of computation, nobody has proved whether 196 ever terminates.

What is the difference between character mode and word mode?

Character mode treats the whole input as one string and checks whether the cleaned version reads the same both ways. Word mode checks each word separately, requiring every individual word to be a palindrome. "racecar level" passes word mode because both words qualify, but it fails character mode because "racecarlevel" reversed is "levelracecar".

Can a single letter be a palindrome?

Yes, trivially. Any single character is a palindrome because reversing it produces the same character. The same is true of the empty string, which is why some programming libraries return true for that edge case and others do not. In practice, palindromes are interesting from two characters upwards.

Is my text sent to a server?

No. Every check runs as JavaScript in your browser. Nothing you type is uploaded or stored on our side. The history is stored locally in your own browser and disappears if you clear your browser data.

Related tools