Strobogrammatic number checker
619 turned upside down still reads 619, so it is strobogrammatic, while 10 fails because the turn reverses its digits. Enter a non-negative whole number to see its rotated form and a clear yes or no. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 619
- Decimal
- 619
- Digit count
- 3
- Rotated
- 619
A strobogrammatic number is a non-negative integer whose decimal digits still form the same digit string after you rotate the whole figure one hundred eighty degrees. Only five digits survive that turn as digits: zero and one and eight stay themselves, while six and nine swap. Any two, three, four, five, or seven breaks the property. This checker takes a single non-negative integer, builds the rotated digit string from right to left with that fixed map, and reports whether the rotated form matches the original. Negative inputs are rejected as invalid so the contract stays aligned with the usual interview and textbook definition for non-negative integers.
What a strobogrammatic number is and which digits rotate
Imagine writing a number on a transparent calculator display and flipping that display upside down. After the turn, each digit either looks like another digit or becomes unreadable. The accepted rotation map in recreational number theory and coding problems is fixed and tiny: zero maps to zero, one maps to one, eight maps to eight, six maps to nine, and nine maps to six.
Digits two, three, four, five, and seven have no standard digit image under a half-turn, so any number that contains them cannot be strobogrammatic. Length matters together with the map because rotation reverses left-to-right order: the least significant digit becomes the most significant after the flip. That is why ten fails even though both of its digits are rotatable: zero and one map cleanly, but the rotated string is zero-one, which is not the same character sequence as one-zero.
Classic positives include zero, one, eight, eleven, sixty-nine, eighty-eight, ninety-six, six hundred nineteen, eight hundred eight, and eight hundred eighteen. Single-digit strobogrammatic values are exactly the fixed points of the map: zero, one, and eight. Two-digit pairs that work are eleven, sixty-nine, eighty-eight, and ninety-six.
The definition is purely combinatorial on digit strings; it does not involve primality, divisibility, or floating-point approximation. Teaching materials often pair strobogrammatic checks with related digit curiosities such as palindromes, but the two properties are independent: a number can be a palindrome without being strobogrammatic, and sixty-nine is strobogrammatic without being a palindrome.
What you can do with it
Interview and contest problem checks
Candidates and graders can verify strobogrammatic classification for arbitrary non-negative integers and inspect the rotated digit string without writing a local map-and-reverse loop.
Classroom number-theory demos
Teachers can show which digits survive a 180° flip and why length plus reverse order matter, with every intermediate field visible for discussion.
FAQ
Which digits are allowed after rotation?
Only 0, 1, 6, 8, and 9. Under the map, 0→0, 1→1, 6→9, 8→8, and 9→6.
Is the strobogrammatic number checker free?
The browser tool runs free on your device.
Are results deterministic?
Yes. The same n always produces the same flags, the same digit count, and the same rotated string when present. There is no model, network call, or randomness in the path.
Why is 10 not a strobogrammatic number?
Because a half-turn also reverses the order of the digits. Both 1 and 0 survive the turn, but the rotated form puts the 0 first and the 1 second, which is a different digit string.
Is a strobogrammatic number the same as a palindrome?
No, the two properties are independent. 619 is strobogrammatic, since the 6 and the 9 swap places when turned, yet read backwards it gives a different number, so it 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/strobogrammatic-number \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":619}'const res = await fetch("https://api.kit.forhosting.com/numth/strobogrammatic-number", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 619
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/numth/strobogrammatic-number",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 619
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/numth/strobogrammatic-number", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":619}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":619}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/numth/strobogrammatic-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": 619
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "numth.strobogrammatic_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.
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
The walk is fully deterministic, needs no network, and runs free in the browser as well as through the item-priced API.
How this checker evaluates the property and what it returns
The implementation validates that n is present, finite, integral, and not negative. It then takes the canonical decimal form without a sign, walks from the last character to the first, and applies the rotation map to each digit. If every digit has a mapped partner, the engine joins those partners into a rotated string of the same length and compares it to the original decimal form with strict character equality. When every digit was rotatable, rotated is included so you can audit the half-turn; when any digit failed the map, rotated is omitted rather than returned as null, matching the framework rule that optional fields are dropped instead of nulled. Call the capability with a field n holding a non-negative integer, either as a JSON number inside the safe range or as a plain digit string that normalizes to an integer. The response always includes n, decimal, digit_count, all_digits_rotatable, and is_strobogrammatic. Missing n, non-integers, values above the published maximum, and any negative n fail with invalid_input and are not charged.
Practical use, limits, pricing, and delivery channels
Use the browser tool when you want an immediate strobogrammatic verdict while studying interview problems, preparing a number-theory lesson, or checking a contest answer without installing a computer-algebra system. Accepted inputs are non-negative integers up to the published maximum so classroom examples and interview demos stay exact inside ordinary number ranges. Results never depend on clocks, random seeds, or remote arithmetic services. If you only need to know whether a display would still look like the same number upside down, this is the dedicated landing for that search intent rather than a general palindrome or digit-sum tool. Each successful request is one billable item at $0.002; failed validation does not consume balance. Wire the endpoint into coding-interview practice apps, recreational math pages, integer classification pipelines, or teaching dashboards where you already prefer exact digit rules 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 strobogrammatic or not can call a single deterministic item-priced endpoint instead of embedding ad hoc rotation tables.
Technical questions
How do I check a strobogrammatic number with this API?
Send a JSON body with non-negative integer field n to the numth.strobogrammatic_number capability. The response returns is_strobogrammatic, decimal, digit_count, all_digits_rotatable, and rotated when every digit maps under the 180° table.
What happens if n is negative?
The request fails with invalid_input. This checker requires a non-negative integer; negatives are rejected and not charged.