Palindrome Checker

A palindrome reads the same forward and backward. “Madam” is easy; “A man, a plan, a canal: Panama” takes a moment to spot because it depends on ignoring punctuation and spaces. This tool normalises whatever you paste, lowercasing, stripping spaces and punctuation, and confirms whether the result is a true palindrome, plus it shows the reversed string side by side.

How the check runs

  1. 1

    Paste text or number

    A single word, a phrase, a long sentence, or a numeric string.

  2. 2

    Normalisation applied

    Case is lowered and everything that is not a letter or digit (spaces, punctuation, symbols) is removed. Every Unicode letter is kept as-is, so accents count and non-Latin scripts work.

  3. 3

    Compare forward vs reversed

    If the normalised string matches its reverse, it's a palindrome.

  4. 4

    Inspect the result

    The tool shows both the raw and normalised strings, reversed, for verification.

Classic palindrome examples

Text Type
madam Single word
level Single word
racecar Single word
A man, a plan, a canal: Panama Phrase
Was it a car or a cat I saw? Question
Never odd or even Phrase
12321 Number
Mr. Owl ate my metal worm Long sentence

Categories of palindrome

  • Character palindromes. The default, same letters forwards and backwards, ignoring spaces.
  • Word palindromes. “I did, did I”, each word mirrored as a unit.
  • Semordnilaps. Words that form a different word when reversed: “stressed” → “desserts.”
  • Numeric palindromes. Any digit sequence that reads the same both ways: 1991, 1881.
  • Genomic palindromes. DNA sequences where a region reads the same on both strands (relevant to restriction enzymes).

Programming the check

The core logic in pseudocode:

function isPalindrome(s):
    normalized = lowercase(s)
    normalized = removeAll(normalized, /[^\p{L}\p{N}]/)   // keep letters and digits, any script
    return normalized == reverse(normalized)

This is a standard interview warm-up question. Variations add edge cases: ignore unicode combining marks, handle empty strings, support emoji, respect grapheme clusters.

Common variations on the rule

  • Strict mode: count every character including spaces and punctuation. "aba" passes; "a man a plan" fails.
  • Alphanumeric only: strip everything that is not a letter or digit. Most casual palindrome checks use this.
  • Unicode normalisation: some checkers fold accented forms (NFKD) before comparing, so “café” would match “éfac”.

This tool uses the alphanumeric-only approach: it lowercases, keeps every Unicode letter and digit (any script), and drops everything else. It does not fold accents, so an accented letter must line up with the same accented letter for the text to count as a palindrome.

Frequently Asked Questions

Yes. Any single character is trivially a palindrome, it equals itself reversed. Most pedagogical definitions require at least three characters to be interesting, but the mathematical definition accepts length 1 and even length 0 (the empty string).

Treat them as strings of digits. 121, 12321 and 1991 are numeric palindromes. For large integers, check the string representation; don’t try to reverse the number arithmetically, which loses leading zeros.

In English, one serious composition is “A Man, a Plan, a Canal: Panama” and its many extensions, Peter Norvig’s computer-generated palindromes reach over 17,000 words, though none are grammatical. The longest single-word palindrome in Guinness-cited English is “tattarrattat” (Joyce, Ulysses).

Yes, in every language. Finnish “saippuakivikauppias” (soapstone seller, 19 letters) is often cited as the longest naturally-occurring single-word palindrome in any language.

Related Tools

Tool available in other languages