Palindrome number checker
Check whether a number reads the same forwards and backwards in any base from 2 to 36: 121 is a palindrome in base 10, and 5 is one in base 2, written one-zero-one. You see the digits and their reverse. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 121
- Base
- 10
- Reversed
- 121
- Digits
- 1, 2, 1
- Reversed digits
- 1, 2, 1
A palindrome number reads the same forwards and backwards once you write it in a chosen numeral base. In base ten that means familiar values such as one hundred twenty-one or seven thousand seven hundred seventy-seven; in base two it means bit strings that mirror themselves, such as five written as one-zero-one. This checker expands the absolute value of an integer into digits in any base from two through thirty-six, reverses that sequence, rebuilds the integer those reversed digits represent, and reports whether the original non-negative value is a palindrome. Bases below two are rejected as invalid. The walk is pure arithmetic: no models, no network, and fully deterministic output you can pin in tests.
What a base-b palindrome number is and how digit reverse works
Write a non-negative integer in positional notation with a fixed base b greater than or equal to two. Each digit is a remainder when you repeatedly divide by b, ordered from most significant to least significant. The number is a palindrome in that base when the digit list equals its own reverse: the first digit matches the last, the second matches the second-to-last, and so on.
Zero is a single-digit palindrome in every valid base. Multi-digit examples include one hundred twenty-one in base ten and the binary string one-zero-one for five. Reversing is not always a bijection on the integers: trailing zeros in the original become leading zeros after the flip and disappear when the value is reconstructed, so one hundred in base ten reverses to one, not to one hundred, and is therefore not a palindrome.
Negative integers carry a leading minus sign that is not a digit; this checker never labels a negative value as a palindrome even when the digits of its absolute value mirror. The definition depends only on integer division and remainder, so it is exact for every accepted n and base without floating-point rounding. Related classroom topics include digit sums, digital roots, and base conversion drills; the palindrome property specifically asks for symmetry of the written form rather than an aggregate of the digits.
Because the digit count grows like the logarithm of the absolute value, the procedure always finishes after a short bounded loop and is ideal for automated checks, interview warm-ups, and teaching demos where students must show both the digit expansion and the reversed reconstruction.
What you can do with it
Interview and contest problem checks
Candidates and graders can verify base-b palindrome classification for arbitrary integers and inspect both digit arrays and the reversed value without writing a local loop.
Classroom base-conversion demos
Teachers can show how the same integer looks in binary, decimal, or hex and whether its digit string is symmetric, with every intermediate digit visible for discussion.
FAQ
What happens if the base is below 2?
Positional bases must be at least 2; values below 2 are rejected and not charged.
Are negative numbers considered palindromes?
The reversed digit value of |n| is still returned.
Is the palindrome number checker free?
The browser tool runs free on your device.
Are results deterministic?
There is no model, network call, or randomness in the path.
Why is 100 not a palindrome?
Reversed, its digits read zero-zero-one, and leading zeros disappear when the number is rebuilt, so the reverse of 100 is 1. Since 1 is not 100, the number is not a palindrome.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/numth/palindrome-number \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":121,"base":10}'const res = await fetch("https://api.kit.forhosting.com/numth/palindrome-number", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 121,
"base": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/numth/palindrome-number",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 121,
"base": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/numth/palindrome-number", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":121,"base":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":121,"base":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/numth/palindrome-number", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"n": 121,
"base": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "numth.palindrome_number",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_n | 1000000000000 |
max_base | 36 |
min_base | 2 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
How this checker evaluates palindromes and returns the reversed value
Call the capability with integer fields n and base. The implementation validates that both are present, finite, and integral; that the absolute value of n stays within the published maximum; and that base lies between two and thirty-six inclusive. For valid input the engine takes the absolute value of n, expands it into a most-significant-first digit array in the chosen base, copies and reverses that array, and converts the reversed digits back into a non-negative integer called reversed. If base is below two, the request fails immediately with invalid_input and is not charged. The boolean is_palindrome is true only when n is non-negative and the original digit array equals the reversed array element by element; otherwise it is false. The response also echoes n and base and includes both digits and reversed_digits so you can audit the expansion without reimplementing base conversion. Missing fields, non-integers, out-of-range bases, and absolute values above the limit all surface as invalid_input with a clear message.
Practical use, limits, pricing, and delivery channels
Use the browser tool when you want an immediate palindrome verdict while studying base conversion, preparing a coding-interview problem, or checking a contest answer without installing a computer-algebra system. Results never depend on clocks, random seeds, or remote arithmetic services. Each successful request is one billable item at $0.002; failed validation does not consume balance. Accepted bases run from two through thirty-six so common binary, octal, decimal, and hexadecimal checks stay inside one endpoint, and absolute values of n are capped so classroom examples remain exact inside ordinary number ranges. Wire the endpoint into interview practice apps, recreational math pages, integer classification pipelines, or teaching dashboards where you already prefer exact digit arithmetic over opaque black-box calculators. Delivery works from the web form, the task API, SDK clients, and other KIT channels without changing the mathematical contract.
Integration use cases
Automated integer classification pipelines
Scripts that tag integers as palindromes in one or more bases can call a single deterministic item-priced endpoint instead of embedding ad hoc reverse logic.
Technical questions
How do I check a palindrome number with this API?
Send a JSON body with integer fields n and base to the numth.palindrome_number capability. The response returns is_palindrome, reversed, digits, and reversed_digits.