# Palindrome Checker - Words, Phrases and Numbers, with the Longest Palindrome Inside

Page: https://hirantha.me/tools/palindrome-checker
Part of: Hirantha Sandaruwan Lakshan free tools (https://hirantha.me/tools)
Updated: 2026-10-13

Check whether a word, phrase or number reads the same backwards. Ignore case, spaces and punctuation, see the first mismatch and find the longest palindrome inside.

This is a free tool that runs in the browser: open the page to use it. File tools process files on the visitor's own device; files are never uploaded or stored. No account, sign-up, payment or watermark.

A palindrome reads the same forwards and backwards. Type a word or a whole phrase and this checker shows the cleaned text, its reverse and, if it fails, the first place where the two disagree. It can also find the longest palindrome hidden inside any text and check numbers in decimal, binary, octal or hexadecimal. Everything runs in your browser.

For phrases the usual rule is to ignore capital letters, spaces and punctuation, so A man, a plan, a canal: Panama counts. The tool cleans your text with the options you choose (all three are shown as switches), cuts it into characters and compares the first with the last, the second with the second last and so on to the middle. If a pair differs it stops there, highlights both characters and says which position failed. The 21 letters of amanaplanacanalpanama are the same reversed, so that phrase passes.

Characters are counted the way a reader sees them. Where the browser has Intl.Segmenter, a letter with a separate accent mark or an emoji built from several parts is one character (a grapheme cluster, Unicode Standard Annex #29); without it the tool counts code points and says so. Emoji and other symbols are ignored along with punctuation unless you switch that option off. Accent folding is off by default, so e and é are different. Turn on the accent switch and the text is normalised with NFKD and the combining marks are removed first, which makes the French line Ésope reste ici et se repose a palindrome.

The longest palindromic substring is found with Manacher's algorithm (Glenn Manacher, 1975), which finds the palindromes around every centre in one linear pass. In babad it is bab, and in forgeeksskeegfor it is geeksskeeg. When two palindromes are equally long, the leftmost is shown. It runs on the cleaned text, so spaces and punctuation are ignored there as well.

A palindromic number reads the same reversed, and whether a number is one depends on the base it is written in. 585 is a palindrome in decimal (585), in binary (1001001001) and in octal (1111), but not in hexadecimal (249). Numbers are handled as exact big integers, up to 300 digits, and the tool also gives the next palindromic number above the one you typed. Negative numbers and decimals are refused with a message, because palindromic numbers are non-negative whole numbers.

Q: What is a palindrome?
A: A word, phrase, number or other sequence that reads the same forwards and backwards. The word comes from the Greek palin (again) and dromos (way, direction). Examples are level, madam and the number 12321.

Q: Do spaces, punctuation and capital letters count?
A: Normally not: Wikipedia notes that punctuation, capitalisation and spaces are usually ignored. This checker ignores case, spaces, punctuation and symbols by default, and each can be switched off for a stricter test. With all of them off, Madam, I'm Adam fails, but madamimadam passes.

Q: Is a single letter or digit a palindrome?
A: Yes. A single character is the same reversed, and Wikipedia states that all one-digit numbers are palindromic. An empty text is not a palindrome here: if nothing is left after the options are applied, the tool tells you there is nothing to compare.

Q: How do I check if a number is a palindrome?
A: Write its digits and read them backwards. 12321 reversed is 12321, so it is one; 12345 reversed is 54321, so it is not. Use the Number mode to check it in decimal, binary, octal or hexadecimal, and to see the next palindromic number.

Q: What is the longest palindromic substring?
A: The longest run of characters inside a text that is itself a palindrome. In racecar the whole word is one. In babad it is bab, and aba is just as long; the leftmost, bab, is shown. The tool computes it with Manacher's algorithm on the cleaned text.

Q: Does it work for accented letters, emoji and other languages?
A: Yes, with a caveat. Text is compared as whole characters, so a letter with a separate accent mark is one character where the browser supports Intl.Segmenter. Accents are kept by default; the accent switch folds é to e. Right-to-left and complex scripts are compared character by character in the order they are stored, which is not always how a reader judges them.

Q: Why can a number be a palindrome in one base and not another?
A: The digits change with the base. 585 is 1001001001 in binary, which is symmetrical, but 249 in hexadecimal, which is not. A number smaller than the base is a single digit and so a palindrome in that base.

Q: Is my text sent anywhere?
A: No. The check runs in your browser and nothing you type is uploaded.

Sources: Wikipedia: Palindrome (checked 13 October 2026) (https://en.wikipedia.org/wiki/Palindrome); Wikipedia: Palindromic number (checked 13 October 2026) (https://en.wikipedia.org/wiki/Palindromic_number); CP-Algorithms: Manacher's algorithm, finding all sub-palindromes in O(N) (checked 13 October 2026) (https://cp-algorithms.com/string/manacher.html); Unicode Standard Annex #29, Unicode Text Segmentation (checked 13 October 2026) (https://www.unicode.org/reports/tr29/); Unicode Standard Annex #15, Unicode Normalization Forms (checked 13 October 2026) (https://www.unicode.org/reports/tr15/); MDN: Intl.Segmenter (checked 13 October 2026) (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)

Related tools:

- [Word & character counter](https://hirantha.me/tools/word-counter.md): Live word, character, sentence, and reading-time counts as you type.
- [Case converter](https://hirantha.me/tools/case-converter.md): Convert text to uppercase, lowercase, title case, or camelCase.
- [Number base converter](https://hirantha.me/tools/number-base-converter.md): Convert whole numbers between binary, octal, decimal, hex and any base from 2 to 36 with exact BigInt maths, negatives, two's complement and step-by-step working.
- [Text reverser](https://hirantha.me/tools/text-reverser.md): Reverse text by characters, words or lines without breaking emoji, accents or Sinhala and Tamil letters, and see how code points differ from UTF-16 units.
- [Prime number checker](https://hirantha.me/tools/prime-number-checker.md): Check whether a number is prime, up to 2^64, see its prime factors and the previous and next prime, and list every prime up to 100,000.
