Palindrome Checker
Type a word or phrase and instantly see whether it reads the same forwards and backwards, ignoring case, spaces, and punctuation.
About the Palindrome Checker
A palindrome is a word or phrase that reads identically forwards and backwards once you ignore case, spacing, and punctuation, "racecar" and "A man, a plan, a canal: Panama" are both classic examples. This tool lowercases your input, strips out everything that isn't a letter or digit, and compares the result to its own reverse. The cleaned-up comparison string is shown underneath the verdict so you can see exactly what was checked.
- Normalization, case, spaces, and punctuation are all ignored before comparing.
- Empty input, shows a neutral prompt instead of a false pass or fail.
- Single characters, correctly treated as palindromes, since a one-character string always equals its own reverse.
The word itself comes from Greek, and means "running back again"
"Palindrome" descends from the Greek palíndromos, combining palin ("again," or "back") with dromos ("running" or "course," the same root that gives English "hippodrome" and "aerodrome"). The term was first applied to wordplay in English in the early 1600s, though palindromic phrases in Greek and Latin are recorded much earlier — the sentence often cited as one of the oldest surviving examples, "Sator Arepo Tenet Opera Rotas," appears on wall inscriptions from the Roman era and reads the same in multiple directions when arranged as a grid, not just forwards and backwards as a single line.
Normalization only keeps ASCII letters and digits, nothing else
The comparison string is built with str.toLowerCase().replace(/[^a-z0-9]/g, ""), which strips anything outside the 26 lowercase Latin letters and the 10 digits. That includes accented characters — é, ñ, ü, and similar letters aren't converted to their unaccented equivalent, they're deleted outright, along with any non-Latin script entirely. This means a phrase that's a genuine palindrome in a language using accented Latin letters might check out as a coincidental match here (or fail to) based on what's left after the accented letters vanish, rather than on the word as actually written. For any text outside plain ASCII letters and numbers, treat the result as a check of the underlying letter skeleton, not the exact original phrase.
Digits are included deliberately, not just letters
Keeping 0 through 9 in the comparison character set means this checker also correctly evaluates numeric and mixed alphanumeric palindromes, not only word-based ones — things like license-plate-style strings, ID sequences, or a phrase mixing digits and letters together. It's the same reason a well-known example like a date written as 02/02/2020 reduces down to a genuinely palindromic digit sequence once the slashes are stripped out, the same normalization step that strips spaces and commas out of classic phrase-based examples like "A man, a plan, a canal: Panama."
Because normalization runs first, the reverse step never has to worry about multi-byte characters
Reversing a string with split("").reverse().join("") is a well-known trap in JavaScript when applied directly to arbitrary text, because it splits by UTF-16 code unit rather than by full character, which can break apart emoji and other characters stored as surrogate pairs into nonsense fragments. This tool avoids that trap by construction rather than by explicitly guarding against it: since the [^a-z0-9] filter already removes every character outside plain ASCII before the reverse ever runs, whatever reaches the reverse step is guaranteed to be single-code-unit ASCII, so the naive split-reverse-join approach is completely safe here — a case where one line of code accidentally sidesteps a bug that other text tools on this site have to handle more deliberately.
Beyond wordplay, "palindromic" describes a real pattern in DNA
The palindrome concept has a genuine technical use outside language: in molecular biology, a palindromic DNA sequence is one where a strand's sequence matches its complementary strand read in reverse, a property that many restriction enzymes rely on to recognize and cut DNA at specific sites. It's a related but distinct idea from a text palindrome — the comparison isn't the sequence against its own literal reverse, but against the base-pairing complement of its reverse — though the naming borrows directly from the same "reads the same going backward" intuition this tool checks for in plain text.
Frequently Asked Questions
Does the checker handle accented letters like é or ñ correctly?
Not by converting them to their unaccented form — the normalization step only keeps plain ASCII letters (a-z) and digits, so accented characters and non-Latin scripts are removed from the comparison entirely rather than folded into a base letter. Treat results involving such characters as a check of the remaining plain-letter skeleton, not the literal original phrase.
Can this check numeric palindromes, like a sequence of digits?
Yes. Digits 0 through 9 are deliberately kept in the comparison character set alongside letters, so numeric strings and mixed alphanumeric text are evaluated correctly, not just word-based phrases.
Does spacing or punctuation affect the result?
No. Everything except plain ASCII letters and digits is stripped out before comparing, so spaces, commas, colons, and other punctuation are ignored, which is what allows a phrase like "A man, a plan, a canal: Panama" to check out as a valid palindrome.
Where does the word "palindrome" come from?
From the Greek palíndromos, meaning "running back again," combining palin ("again") with dromos ("running"), the same root behind words like hippodrome. It entered English as a term for wordplay in the early 1600s, though palindromic phrases in Greek and Latin predate that by centuries.
Is a "DNA palindrome" the same thing as a text palindrome?
Related but not identical. A palindromic DNA sequence matches its complementary strand read in reverse, rather than matching its own literal reverse the way a text palindrome does. The two concepts share their name because both rely on the same "reads the same going backward" idea, applied differently.