Palindrome checker
Check whether text reads the same forward and backward with configurable normalization and side-by-side diff highlighting.
Forward
Reversed
About the Palindrome
The palindrome checker tests whether text reads the same forwards and backwards, and shows you exactly why by laying the original and its reverse side by side with mismatched characters highlighted. A palindrome is a word or phrase like level, racecar, or the classic Never odd or even, which is symmetric once you decide what counts.
What counts is the interesting part, so the tool gives you two switches. By default it ignores case and strips spaces and punctuation, the usual way phrase palindromes are judged, so A man, a plan, a canal: Panama passes. Turn on case sensitivity or include spaces and punctuation to test stricter definitions, for example checking a single word or a code identifier exactly as typed.
How to use it
- Type or paste a word or phrase into the input box.
- Read the badge at the top, which shows Palindrome or Not a palindrome as you type.
- Leave the switches off to test the common phrase definition that ignores case, spaces, and punctuation.
- Turn on Case-sensitive or Include spaces and punctuation to apply a stricter rule.
- Compare the Forward and Reversed panels, where any characters that fail to match are highlighted in red.
Examples
Test a classic phrase palindrome
You enter A man, a plan, a canal: Panama with the default settings. Spaces, commas, the colon, and capitals are stripped, leaving amanaplanacanalpanama, which reads identically reversed. The badge shows Palindrome and both panels match with no red, confirming the famous line.
Check a word exactly as typed
You want to know if Level is a strict palindrome. With case-sensitive on, the forward string keeps the capital L, but reversed it ends in a lowercase l, so those positions highlight red and the badge reads Not a palindrome. Turn case-sensitive off and it passes.
Frequently asked questions
- What does the default normalization do?
- With both switches off, the checker keeps only letters, dropping spaces, digits, and punctuation, and compares case-insensitively. That matches how phrase palindromes are conventionally judged, so punctuation and capital letters never break a match.
- How does Include spaces and punctuation change the test?
- It compares the raw text with nothing removed, so spaces, commas, and capitals all have to mirror too. Under that strict rule Never odd or even fails, because the spaces do not line up symmetrically once everything is kept.
- Are numbers treated as palindromic?
- Only when you include spaces and punctuation. By default the tool keeps just letters, so digits are stripped before checking. To test a numeric palindrome like 12321, switch on Include spaces and punctuation so the digits are kept and compared.
- What do the red highlights mean?
- Each character in the forward string is compared to the character at the same position in the reverse. Any position where the two differ is highlighted red in both panels, so you can see precisely where the symmetry breaks instead of just getting a yes or no.
Good to know
Palindromes are mostly recreational, popular in word games, puzzles, and as a teaching example, but the underlying check is a genuine programming exercise. Reversing a string and comparing it to the original, after deciding how to normalise case and non-letter characters, is a classic interview question, and this tool is a quick way to sanity-check examples while you reason about the edge cases.
The trickiest cases are normalisation and unusual characters. Whether a palindrome ignores spaces and punctuation is a choice, not a fact, which is why the switches exist; always state which definition you mean. The reverse is built character by character, so most accented letters and emoji flip cleanly, though characters made of combining marks can behave unexpectedly. For a plain word or sentence in everyday text, the result is exactly what you would get checking it by hand.