🪞Palindrome Checker

Check if text is a palindrome

How the palindrome check is made

A palindrome reads the same forwards and backwards. Single words like racecar and level qualify on their own, while longer classics such as A man, a plan, a canal: Panama only work once spacing and punctuation are set aside. This tool cleans the pasted text in a fixed order, reverses it, and compares the two versions character by character.

Cleaning has two steps. With ignore spaces and punctuation on, only letters and digits survive, so blanks, commas, periods and exclamation marks disappear. Note that emoji and symbols are neither letters nor digits, so they are dropped by the same rule. Ignoring letter case then folds everything to lower case. The preprocessing line reports exactly how many characters were removed and how many were finally compared, so an unexpected verdict is easy to explain.

Reversal works on user-perceived characters rather than raw code units, so emoji built from joined code points and other combined characters are never split in half. When the text is not a palindrome, the result names the first position where the two directions disagree and shows the character seen from each end, which tells you where an edit would be needed. Everything runs in your browser and nothing is uploaded.

Frequently asked questions

Can a sentence with spaces be a palindrome?

Yes, with ignore spaces and punctuation switched on. Most famous sentence palindromes only work once spacing and punctuation are removed, which is why the option is on by default.

What happens to emoji in the text?

With the punctuation option on they are removed along with other non-letter characters. Turn it off and emoji are compared too, with joined sequences treated as one character when reversing.