Bijective base-26 encoder
Turn a column number into its spreadsheet letters, or letters back into a number: 27 becomes AA, 26 is Z and 702 is ZZ, the same labels Excel and Google Sheets show. There is no zero, so 0 is refused. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 27
- Direction
- encode
- Decimal
- 27
- Decimal string
- 27
- Letters
- AA
- Letters lower
- aa
Bijective base-26 is the letter numbering used by spreadsheet columns: one maps to A, twenty-six maps to Z, twenty-seven maps to AA, and there is no zero digit—unlike ordinary base-twenty-six, which would need a symbol for zero and would not match Excel or Google Sheets. The algorithm is pure and deterministic: encode peels bijective remainders after subtracting one each step; decode accumulates letters with a left-to-right Horner scheme where A equals one and Z equals twenty-six.
What bijective base-26 means and how it differs from ordinary base-26
Ordinary positional base-twenty-six would use digit values zero through twenty-five and typically needs either a zero symbol or a zero-based index. Spreadsheet software instead uses a bijective numeration system with twenty-six symbols A through Z and no zero: every positive integer has exactly one finite representation, and the sequence runs A, B, …, Z, AA, AB, … without a gap or a leading-zero convention.
Encoding a positive integer n is the classic bijective remainder loop: subtract one so the residue falls in zero through twenty-five, emit the corresponding letter as the next least-significant digit, replace n with the floor of n divided by twenty-six, and repeat until n is zero. Decoding walks the letter string from left to right, multiplying the running total by twenty-six and adding the letter value with A equal to one through Z equal to twenty-six.
That identity is why twenty-six becomes Z, twenty-seven becomes AA, and seven hundred two becomes ZZ—the same labels you see on column headers in Excel and Google Sheets.
Where bijective base-26 conversion earns its keep
Spreadsheet importers map one-based column indices into A, B, …, AA labels when generating formulas, named ranges, or human-readable error messages that point at a bad cell. ETL and warehouse jobs that export flat files often store column numbers in metadata and need the same letter string that end users see in Excel so support tickets and log lines stay aligned.
Classroom and discrete-math assignments introduce bijective numeration as the system that has no zero digit; teachers need a deterministic oracle that treats zero as invalid rather than inventing a blank or a leading A. Prefer this tool when you specifically need spreadsheet-style bijective base-26; use ordinary base-thirty-six or hex converters when your alphabet includes digits or a true zero place value.
What you can do with it
Spreadsheet column labels
Map one-based column indices to A, Z, AA, XFD-style labels when building formulas, range names, or user-facing error messages.
ETL and data-import diagnostics
Convert stored column numbers into the same letter headers operators see in Excel so logs and support tickets stay consistent.
Homework and coding drills
Check bijective base-26 encode and decode edge cases (26→Z, 27→AA) with a deterministic oracle for classes and interview prep.
FAQ
What is bijective base-26?
A numeration system with digits A–Z and no zero. Positive integers map uniquely: 1=A, 26=Z, 27=AA—the same scheme spreadsheet columns use.
Why is zero rejected?
Bijective base-26 has no zero digit and spreadsheet columns start at 1 = A.
How do I turn column letters into a number?
Read the letters from left to right, multiplying the running total by 26 and adding each letter's value, from A as 1 to Z as 26. For AA that is 1 times 26 plus 1, which gives column 27.
How is a number turned into column letters?
Subtract one, take the remainder after dividing by 26 as the last letter, from A for 0 to Z for 25, then divide by 26, drop the fraction and repeat. That is why 27 becomes AA and 703 becomes AAA.
Can I type the letters in lowercase?
Yes. Letters are read without regard to case and spaces around the value are trimmed, but only A to Z are allowed: digits or symbols inside the letters are rejected. The result always comes back in uppercase, with a lowercase copy alongside.
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/enc/base26-bijective \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":"27","direction":"encode"}'const res = await fetch("https://api.kit.forhosting.com/enc/base26-bijective", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": "27",
"direction": "encode"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/base26-bijective",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": "27",
"direction": "encode"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/base26-bijective", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":"27","direction":"encode"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":"27","direction":"encode"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/base26-bijective", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": "27",
"direction": "encode"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.base26_bijective",
"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
Developers, data engineers, and students look up this mapping when they write column index helpers, import CSV headers into typed schemas, or check homework that asks for the n-th column label. This bijective base-26 encoder accepts a value and a direction: encode turns a positive whole number into an uppercase letter string; decode turns an A through Z string back into a positive integer. Invalid input—zero, negatives, non-integers when encoding, or non-letter characters when decoding—fails with a clear invalid_input message and is not billed. Use the free browser path for quick checks, or the API at $0.002 per successful call when automation needs the same contract in CI, ETL jobs, and classroom tools.
What bijective base-26 means and how it differs from ordinary base-26
This capability returns the original value echo, a normalized direction of encode or decode, the decimal integer and its decimal_string form, uppercase letters plus a letters_lower convenience field, a method tag bijective_base26, a short formula reminder, base twenty-six, and scheme bijective so API clients can document the mapping without guessing. There is no fractional path, no silent acceptance of zero as a blank column, and no network or clock dependence: the engine either builds an exact conversion inside the supported magnitude or rejects the input with invalid_input.
Input contract, directions, and error behaviour
Outer whitespace is trimmed. When decoding, value must be a non-empty letter string using only A through Z, case-insensitive; any digit, space, underscore, or punctuation fails with a message that names the invalid bijective base-26 character. Failed validation is not charged. POST a JSON body with two required fields: value and direction. Value may arrive under aliases v, input, text, number, n, decimal, column, or letters so forms, query strings, and spreadsheet cells can reuse one contract. Direction may use encode, to, to_base26, to_column, or integer_to_letters to map a positive integer to letters; or decode, from, from_base26, from_column, or letters_to_integer to map letters to an integer. When encoding, value must be a positive whole number greater than or equal to one—JSON numbers that are finite integers, digit strings, or optional leading plus signs are accepted; zero, negatives, decimals such as three point five, Infinity, and NaN fail with invalid_input and a message that names the problem so a bad cell does not become a wrong label. Magnitude is capped at Number.MAX_SAFE_INTEGER so JSON goldens compare without BigInt quirks and every result stays an exact safe integer. On success the response echoes the trimmed value and normalized direction, reports decimal and decimal_string, exposes letters and letters_lower, and includes method, formula, base, and scheme for logs and teaching UIs.
Where bijective base-26 conversion earns its keep
On this page the work runs entirely in your browser; through the API each successful conversion costs $0.002, invalid input is not billed, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical parse path—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.
Technical questions
How do I convert an integer to a column letter?
Send value as a positive whole number and direction encode (or to_base26). Example: value 27 returns letters AA.
How do I convert column letters back to an integer?
Send value as an A–Z string (case-insensitive) and direction decode (or from_base26). Example: value AA returns decimal 27.
What does the bijective base-26 encoder cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.