Palindrome Checker

Result

Check whether a word, number or whole phrase reads the same forwards and backwards. Ignores spaces, case and punctuation, or run it strictly. Free.

A palindrome reads the same in both directions. Words first: “level”, “radar”, “kayak”, “noon”, “racecar”. Numbers too: 12321, 2002. Then the harder kind, whole phrases, where the spaces and punctuation are ignored and only the letters count: “A man, a plan, a canal: Panama”, “Was it a car or a cat I saw?”, and “No lemon, no melon”.

Type a word or phrase, one per line, and the table says whether each is a palindrome.

The two ways of judging

Most people who say “palindrome” about a phrase mean the relaxed version, which is the default here. Case is ignored, and so are spaces and punctuation, so “A man, a plan, a canal: Panama” counts. The check reduces the text to just its letters and digits, “amanaplanacanalpanama”, and compares it with the same string reversed.

Untick the options and the check becomes strict. Every character must match, including capitals, spaces and punctuation. Under strict rules, “Racecar” is not a palindrome, since “R” and “r” differ, and neither is “A man, a plan, a canal: Panama”. Both approaches are legitimate; the second is the one that many programming exercises use, and the first is the one in puzzle books.

A single character such as “a” counts as a palindrome, and a line with no letters or digits at all is reported as No.

Interesting types

Word palindromes are the simplest. Sentence palindromes are harder to write, which is why the famous ones have lasted. There are also word-by-word palindromes, in which the words reversed give the same sentence (“You can cage a swallow, can’t you, but you can’t swallow a cage, can you?”). The tool checks letters, not word order, so those will not register; reverse them with the text reverser, which has a mode for reversing the order of words.

Palindromic numbers have a life of their own. 11, 121 and 1331 are palindromes, and so is every date format that reads the same backwards, such as 02/02/2020. A fun test is to paste a column of years and see which are palindromes.

For programmers

This is a classic interview question, so the checker is a handy way to verify your own solution against a set of inputs. Remember what the question asks: it should say whether case and punctuation matter before you start.

If you enjoy this kind of word puzzle, the anagram checker tests whether two words use the same letters, and the syllable counter is useful for poetry.

Frequently asked questions

Is "A man, a plan, a canal: Panama" a palindrome?

Yes, when you ignore case, spaces and punctuation, which is the default setting. The letters read amanaplanacanalpanama in both directions. Under strict rules, with every character counting, it is not.

Can a number be a palindrome?

Yes. 12321 reads the same both ways, and the checker handles digits as well as letters.

Does it check whether the words in a sentence are in a palindromic order?

No, only the letters. To reverse the word order of a sentence, use the text reverser's word mode and compare the result by eye.