Pandigital number checker
Check whether a number uses every digit of its base exactly once: 1023456789 is pandigital in base 10, while a number made only of the digits 1 to 9 is not, because 0 is missing. Works in bases 2 to 36. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 1,023,456,789
- Base
- 10
- Digit count
- 10
A pandigital number in a given base uses every digit of that base exactly once—no gaps and no duplicates. In base ten that means the ten symbols zero through nine each appear once; in base two the bits zero and one each appear once; in base sixteen every value from zero to fifteen must show up exactly once in the place-value expansion. Students, contest authors, and puzzle solvers get a deterministic audit trail without computer-algebra software or opaque libraries.
What pandigital means in a chosen base
Write a non-negative integer n in base b and look at the multiset of its digits. The full symbol set for that base is zero, one, two, up through b minus one. The number is fully pandigital when that multiset equals the full set exactly once each: every required digit appears, none is missing, and none appears twice.
Classic base-ten examples include one billion twenty-three million four hundred fifty-six thousand seven hundred eighty-nine, whose decimal writing is one-zero-two-three-four-five-six-seven-eight-nine and therefore contains each decimal digit once. In base two the integer two writes as one-zero and is pandigital; the integer three writes as one-one and is rejected because the digit one repeats. The definition is fixed and deterministic: there is no sampling, randomness, approximate floating arithmetic, or locale-dependent numeral formatting.
Leading zeros never appear in the positional expansion of a positive integer, so zero must occupy a non-leading place when a full set including zero is required—that is why many famous ten-digit pandigitals begin with a non-zero digit and place zero somewhere after the first position.
What you can do with it
Programming contest and Project Euler validators
Assert candidate solutions for classic pandigital problems without reimplementing base conversion and duplicate detection in every language harness.
Puzzle and teaching demos of place-value digit sets
Project present and missing arrays in class so learners see which base symbols appear, which are absent, and why repeats fail the contract.
FAQ
What is a pandigital number?
In base b, a non-negative integer whose digits use each symbol 0 through b−1 exactly once. In base 10 that means every digit 0–9 appears once.
Does this tool require zero in base 10?
Yes. Full pandigital form here needs the complete set 0..base−1.
Which bases are supported?
Integers from 2 through 36. Default base is 10.
Is the pandigital number checker free?
The browser tool is free and runs locally.
Why is a number with only the digits 1 to 9 not pandigital?
In base 10 every digit from 0 to 9 must appear once, and such a number has no 0. The result lists 0 as the missing digit, so the number is not fully pandigital.
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/pandigital-checker \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":1023456789}'const res = await fetch("https://api.kit.forhosting.com/numth/pandigital-checker", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 1023456789
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/numth/pandigital-checker",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 1023456789
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/numth/pandigital-checker", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":1023456789}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":1023456789}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/numth/pandigital-checker", 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": 1023456789
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "numth.pandigital_checker",
"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_n | 999999999999999 |
min_base | 2 |
max_base | 36 |
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
This capability converts a non-negative integer to digits in bases two through thirty-six, fails hard if any digit repeats, and otherwise reports the ordered digit list, which symbols are present, which are missing, and a clear boolean for full pandigital form.
What pandigital means in a chosen base
A nine-digit string such as one two three four five six seven eight nine is interesting for many puzzles but is not full base-ten pandigital here because zero is absent—the response lists missing as a one-element array containing zero and sets is_pandigital to false. The endpoint never invents a partial digit list; every contribution is an integer remainder under successive division by the base.
How to call the API and what comes back
Use it from homework pipelines, programming-contest validators, Project Euler style checkers, interview-prep sandboxes, or any workflow that needs a reproducible pandigital verdict without installing specialized number-theory packages on every machine. Send a JSON body with required field n—a whole number at least zero and at most nine hundred ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine so every value stays inside safe JavaScript integers—and optional base, an integer from two through thirty-six defaulting to ten. Aliases number and value are accepted for n; radix is accepted for base. On success the response includes n and base as accepted, digits as an ordered array from most to least significant place, digit_count, present as the sorted unique digits found, missing as the sorted list of symbols from zero through base minus one that never appear, and is_pandigital as a boolean that is true only when missing is empty and the digit count equals the base. If any digit repeats, the task fails with invalid_input rather than returning a soft false—the contract is to report missing digits only for inputs that already use each appearing digit at most once. Failed validation—missing n, a non-integer, a fraction, a negative, a base outside two through thirty-six, or any repeated digit—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
If you need multiprecision candidates with dozens of digits, use a dedicated big-integer stack—this lightweight parse capability is built for interactive checks and teaching-sized inputs. When teaching, show both outcomes: a full base-ten pandigital such as one zero two three four five six seven eight nine, a near-miss that omits zero, a small base-two success, and a repeated-digit rejection so learners see the hard error path. Sibling number-theory landings in this kit target other intents such as Armstrong or narcissistic checks, aliquot sums, or modular exponentiation; this page is specifically for people searching whether a given integer is pandigital or which base digits are missing. Keep n within the published safe-integer range so base conversion stays exact on the Worker and in the browser. Because present and missing are explicit arrays, students can recompute the digit multiset by hand and match the API line by line. Do not treat the boolean alone as a black box—pair it with missing and digits when grading submissions so partial credit or wrong base assumptions are easy to diagnose. Remember that “1 through 9 pandigital” puzzles omit zero by design; this tool requires the complete set zero through base minus one for is_pandigital true, and will report zero in missing when that is the only gap. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type bad values while learning the contract. Bases above ten use numeric digit values eleven, twelve, and so on rather than letter glyphs in the JSON output, which keeps the response machine-readable across every client language.
Integration use cases
Homework: verify pandigital answers and missing digits
Give students an integer and base; check their hand-written digit list, missing-symbol set, and yes/no label against a deterministic API or free browser result.
Technical questions
What happens if the number has repeated digits?
The task fails with invalid_input. Repeats are not soft-failed as is_pandigital false; the contract rejects non-unique digit multisets.