What Is a Palindrome? Rules, Famous Examples and How to Check One

Learn what counts as a palindrome in words, numbers and sentences, why spaces and punctuation are usually ignored, and how to test or find palindromes.

Updated September 29, 2026 5 min read

Use the free Palindrome CheckerCheck if a word or phrase is a palindrome and find hidden ones

"Racecar", "level", "noon" and "A man, a plan, a canal: Panama" all share a property: they read the same forwards and backwards. Palindromes turn up in word puzzles, school assignments, programming interviews and even in the dates on the calendar, and they are one of the oldest forms of wordplay.

This guide explains exactly what counts as a palindrome, why the rules differ between a single word and a whole sentence, gives examples across letters and numbers, and shows how to check any text or find the palindromes hidden inside it.

The definition, and the fine print

A palindrome is a sequence that is identical when reversed. For a single lowercase word, that is unambiguous: level reversed is level.

Things get interesting with anything longer, because written language contains characters that are not really "part of" the palindrome:

  • Case. Anna reversed is annA. Almost everyone treats this as a palindrome, so case is normally ignored.
  • Spaces. step on no pets works letter by letter, but the spaces fall in different places when reversed. By convention, spaces are ignored.
  • Punctuation. Madam, in Eden, I'm Adam only works if the commas and apostrophe are skipped.

So the usual rule for sentence palindromes is: remove spaces and punctuation, ignore case, then compare. A strict palindrome keeps everything, which makes it much rarer. Knowing which rule is in play matters, especially in programming exercises where the task description may say either.

Letter, word and line palindromes

Most palindromes are letter-by-letter. There are other kinds too:

  • Word-unit palindromes reverse the order of words rather than letters, such as "Fall leaves after leaves fall".
  • Line palindromes in poetry repeat lines in reverse order.

Tools and textbooks almost always mean the letter-by-letter kind.

Examples worth knowing

Type Examples
Words level, radar, civic, rotor, refer, kayak, racecar
Names Anna, Hannah, Otto, Bob
Phrases Never odd or even · Step on no pets · Was it a car or a cat I saw?
Sentences A man, a plan, a canal: Panama · Madam, in Eden, I'm Adam
Numbers 121, 1331, 12321, 9009

Palindromic numbers and dates

A number is palindromic when its digits read the same both ways, such as 12321. Dates can be palindromes too, but only in a particular written format: a date that is palindromic as DDMMYYYY is usually not palindromic in MMDDYYYY, so claims about "palindrome days" depend on the format being used.

Check a palindrome in your browser

Our Palindrome Checker applies the usual rules by default and lets you switch each one off.

  1. Open Palindrome Checker and type into Word, phrase or text to check. Click Sample or one of the example buttons, such as "Never odd or even", to see how it works.
  2. Choose the rules: Ignore case, Ignore spaces and Ignore punctuation are all on by default. Turn them off for a strict check.
  3. Read the verdict: "Yes, it's a palindrome!" or "No, this is not a palindrome." Underneath, Compared shows the exact characters that were tested and Reversed shows them backwards, so you can see where a mismatch occurs.
  4. Check the stats: Characters compared, Palindromic words and Longest palindrome.
  5. Look at Longest palindromic sequence to see the longest run of characters that reads the same both ways, even inside text that is not a palindrome overall. You can copy it.
  6. See Palindromic words (2+ letters) for individual words such as "level" or "noon" found in your text.
  7. Paste several lines to get a Line by line result, with each line checked separately.

The longest-sequence search looks at the first 5,000 compared characters, so it stays fast on long text.

Other ways to check

By hand

Write the text without spaces or punctuation in lowercase, then compare the first and last letters, the second and second-last, and so on towards the middle. If every pair matches, it is a palindrome. This is exactly what software does, and it is a good way to understand why "Was it a car or a cat I saw?" works.

In a spreadsheet

Spreadsheets have no built-in reverse function for text, so a formula-based check is awkward. In Google Sheets or Excel 365 you can reverse text with array formulas combining MID and SEQUENCE, but for occasional checks a dedicated tool is simpler.

In code

The classic interview solution normalises the string and compares it with its reverse. In Python:

import re
def is_palindrome(s):
    t = re.sub(r"[\W_]", "", s).lower()
    return t == t[::-1]

A two-pointer loop that walks inwards from both ends avoids building a reversed copy. Finding the longest palindrome inside a string is a separate, harder problem; the expand-around-centre method is a common approach and is what our tool uses.

If you only need to reverse text rather than test it, Reverse Text does that directly.

Tips and edge cases

Accented letters

é and e are different characters, so a phrase that relies on treating them as equal will fail. Remove accents first with Remove Accents if your language or puzzle treats them as the same letter.

Numbers in text

Digits count as characters, so "Room 101" is compared as room101. That is not a palindrome, but the tool will still find 101 as a palindromic word.

Single letters

A single character is technically a palindrome, which is why the word list only includes words of two or more letters.

Palindromes versus anagrams

A palindrome reads the same backwards; an anagram rearranges letters into a different word. "Listen" and "silent" are anagrams, not palindromes. To compare two words that way, use the Anagram Checker.

Frequently asked questions

What is a palindrome?

A word, number, phrase or sentence that reads the same forwards and backwards. For phrases, spaces, punctuation and capitalisation are usually ignored.

Is "racecar" a palindrome?

Yes. Reversed, r-a-c-e-c-a-r is still racecar, so it is one of the best-known examples.

Do spaces and punctuation count in palindromes?

By convention they do not, which is why "A man, a plan, a canal: Panama" counts. Switch off the ignore options in our checker for a strict test.

What is the longest palindromic word in English?

Different dictionaries give different answers, and many candidates are rare or technical, so it depends on which word list you accept. "Racecar", "rotator" and "redivider" are well-known long everyday examples.

Can numbers be palindromes?

Yes. Numbers such as 121, 4554 and 12321 read the same in both directions and are called palindromic numbers.

Try it now: Palindrome Checker

Loading tool…