Logo

MonoCalc

/

Palindrome Number Checker

Math
Any whole number from 0 up to 1,000,000,000,000,000, entered in decimal.

Try:

Digit values above 9 use the letters A to Z. Any base from 2 to 36.
Applies to the density and percentage figures, 0 to 10.

Palindrome test in base 10 (decimal)

12,321 is a Palindrome

Palindrome5 digits

Digits against their mirror

Original

12321

Reversed

12321

12321 reversed is 12321

Decimal value

12,321

Digits in base 10

12321

5 digits long.

Reversed

12321

Identical to the original.

Mirrored pairs that clash

0

Every pair agrees.

The digits mirror exactly
12,321 is written 12321, and reversing those 5 digits gives 12321 — exactly the same string — so the number is a palindrome in this base.

Nearest palindromes in base 10 (decimal)

Previous palindrome

12,221

12221 in base 10, 100 below.

Next palindrome

12,421

12421 in base 10, 100 above.

The same value written in bases 2 to 16

1 of 15 bases mirror6.667% of the bases tested
BaseDigitsReversedPalindrome
21100000010000110000100000011No
3121220100001022121No
430002011020003No
5343241142343No
6133013310331No
75063113605No
83004114003No
91781001871No
101232112321Yes
1192911929No
1271699617No
1357BAAB75No
1446C11C64No
1539B66B93No
1630211203No

About This Tool

Palindrome Number Checker – Digits, Bases and Palindromic Primes

A numeric palindrome is a whole number whose digits read the same in both directions: 121, 1331, 12321. Unlike a word palindrome there is nothing to tidy up first — no capital letters, spaces or punctuation to strip — so the entire test comes down to writing the number out and comparing that string with its own reverse. This checker does exactly that, then goes further: it repeats the test in any base from 2 to 36, finds the nearest palindromes on either side of your value, flags palindromic primes, sweeps a range for every hit, and runs the classic reverse-and-add sequence.

How the Check Works

Convert the number to a digit string, reverse it, compare. In code that is s === s.split("").reverse().join(""), and the tool shows both strings stacked so you can see which mirrored pairs agree. Every single-digit number is a palindrome by definition, in every base, because there is nothing for it to disagree with. Numbers are handled with BigInt arithmetic rather than floating point, so fifteen-digit inputs and the long terms produced by reverse-and-add stay exact instead of drifting once they pass 2^53.

Palindromes Depend on the Base

Being a palindrome is a property of the written form, never of the quantity. Take 585: in decimal it reads the same backwards, and in binary it is 1001001001, which also mirrors — a rare double. Meanwhile 12 is nobody's decimal palindrome, yet it is 1100 in binary, 22 in base 5 and C in hexadecimal, so two of those three forms are palindromic. The multi-base scan lays out bases 2 through 16 side by side, which makes it easy to hunt for numbers that mirror in several bases at once. Bases above 10 borrow the letters A to Z for digit values 10 to 35, exactly as hexadecimal does.

Finding the Next Palindrome

Counting upward one number at a time works but is wasteful. The efficient method mirrors the leading half of the digits onto the tail: for 123 that produces 121, which is too small, so the half 12 is bumped to 13 and mirrored again to give 131. When the increment overflows — as it does for 999 — the answer is the shortest palindrome with one extra digit, 1001. Because the work scales with the digit count rather than the gap, the next palindrome after a fifteen-digit number appears instantly. The tool applies the same trick downward to report the previous palindrome and the gap on each side.

Palindromic Primes

A palindromic prime is prime and palindromic at once: 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353 and so on. There is a neat reason the list skips every two-digit entry after 11 and jumps straight from 11 to 101 — any decimal palindrome with an even number of digits is divisible by 11, so 11 itself is the only one that survives. Primality here uses a deterministic Miller–Rabin test with twelve fixed witnesses, which returns a proven answer for every value this tool accepts rather than a probabilistic one.

Repunits and other curiosities
Repunits — numbers made entirely of ones, like 11, 111 and 1111 — are palindromes in every case, and a few of them are prime. So are numbers like 10301 and 1003001. Turn on the range scan with prime flagging to collect them in bulk.

Reverse-and-Add and the 196 Problem

Add a number to its own reversal, then repeat with the total until the result is a palindrome. Most starting points give in quickly: 59 becomes 154, then 605, then 1111 in three steps. A few resist. Starting from 196 the sequence has been pushed through billions of iterations and hundreds of millions of digits without ever landing on a palindrome, which makes 196 the smallest suspected Lychrel number — suspected, because no proof exists that it never terminates. The reverse-and-add mode shows every intermediate sum so you can watch a value either converge in a handful of steps or run away.

Scanning a Range

The scan mode walks through an interval and lists every palindrome it finds, optionally marking the primes. Between 100 and 150 the hits are 101, 111, 121, 131 and 141, of which 101 and 131 are palindromic primes. Palindromes thin out fast as numbers grow, since there are only about 2√n of them below n, so a scan of a wide interval high up the number line often returns just a handful. Results can be copied, downloaded as text, or exported as CSV for further work, and the share link rebuilds the exact number, base and mode you were looking at.

Frequently Asked Questions

Is the Palindrome Number Checker free?

Yes, Palindrome Number Checker is totally free :)

Can I use the Palindrome Number Checker offline?

Yes, you can install the webapp as PWA.

Is it safe to use Palindrome Number Checker?

Yes, any data related to Palindrome Number Checker only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this palindrome number checker work?

It writes your number out as a digit string in the base you choose, reverses that string, and compares the two character by character. If they match the number is a palindrome; if not, the tool points to the first mirrored pair that disagrees. The same digit string is reused to find the next palindrome, to test for primality and to run reverse-and-add sequences.

Can a number be a palindrome in one base but not another?

Yes, and it happens constantly. 9 is a palindrome in decimal and is 1001 in binary, also a palindrome, while 12 is not a palindrome in decimal but is 1100 in binary and 22 in base 5. Palindromicity is a property of the written representation, never of the quantity itself, which is why the base selector changes the answer.

What is a palindromic prime?

A palindromic prime is a number that is both prime and reads the same in reverse, such as 2, 3, 5, 7, 11, 101, 131, 151, 181 and 191. Apart from 11 itself, every palindrome with an even number of decimal digits is divisible by 11, so all other decimal palindromic primes have an odd digit count.

Are negative numbers ever palindromes?

By convention no. The leading minus sign of a value like -121 has nothing to mirror at the other end, so the written form reverses to 121- and cannot match. This tool therefore accepts whole numbers of 0 or more and explains the rule if you enter a negative value.

How large a number can I check?

Single checks and next-palindrome searches accept values up to 10^15, and calculations run on BigInt arithmetic so nothing is lost to floating-point rounding. Range scans walk through at most one million consecutive values at a time, which keeps a scan responsive even on a phone.

What is the 196 problem?

Reverse-and-add takes a number, adds it to its own reversal, and repeats until the total is a palindrome — 59 gets there in three steps. Starting from 196 nobody has ever reached a palindrome despite billions of iterations, making it the smallest suspected Lychrel number, though no proof exists that it never terminates.