Convert Excel column letters to numbers and numbers to letters
This Excel column converter changes familiar spreadsheet references in either direction.
Run — free
Enter letters such as A, Z, AA, or XFD to receive the corresponding positive column number, or enter a number such as 1, 27, or 16384 to receive its letter reference. It handles lowercase letters and surrounding spaces, returns a clear result that is easy to use in code, and rejects malformed letters, zero, negative values, decimals, and numbers too large for safe integer arithmetic.
Convert a column letter into its number
Enter a letter reference exactly as it appears above a spreadsheet column, without a row number or cell punctuation. A becomes 1, Z becomes 26, AA becomes 27, and the pattern continues for longer references. Lowercase input is accepted and normalized to uppercase in the result, while spaces immediately before or after the reference are ignored. The conversion is based on a one-indexed alphabetic system rather than ordinary base 26: there is no zero digit, so Z is followed by AA instead of BA. This distinction matters when you are implementing imports, generating formulas, or translating user-facing spreadsheet coordinates into array offsets. The response includes both the normalized column letter and its positive column number, making the direction and the result explicit. Inputs containing digits mixed with letters, punctuation, spaces inside the reference, a dollar sign, or a row suffix are rejected. For example, use AA rather than AA12 or $AA, because this tool converts column references rather than complete cell addresses.
Convert a number into a column letter
Enter any positive whole number that can be represented safely by JavaScript, either as a numeric value through the API or as digits in the text field. The converter repeatedly maps the one-based remainder to A through Z, producing the same labels used by Excel and other spreadsheet programs. Thus 1 returns A, 26 returns Z, 27 returns AA, and 52 returns AZ. Zero and negative numbers are invalid because spreadsheet columns begin at one. Decimal values, exponential notation, signs, separators, and unsafe integers are also rejected rather than rounded or guessed. Although modern Excel worksheets have a product-specific final column, this converter intentionally implements the general letter-number notation and does not impose a particular application version's worksheet limit. That makes it useful for generic tabular systems and algorithms that use the same naming convention. If your destination has its own maximum column count, validate that business limit separately after conversion. The returned object contains the original numeric meaning alongside the generated uppercase letters.
Use reliable conversions in spreadsheet workflows
Column conversion is a small operation that often sits inside larger automation: building ranges, mapping CSV headers, creating spreadsheet formulas, interpreting configuration files, or displaying friendly coordinates in a user interface. Keeping it as a deterministic capability prevents different services from implementing subtly different rules around Z, AA, and later boundaries. The algorithm uses no network requests, randomness, current time, external workbook, or stored state, so identical input always produces identical output. Validation is deliberately strict. If a value looks like neither a positive integer nor letters A through Z, the request fails with an invalid-input error instead of silently changing the value. This behavior is especially helpful in pipelines, where an early error is easier to diagnose than a formula aimed at the wrong column. Interactive use is available directly in the browser, while an API request costs $0.002. For bulk work, call the capability once for each reference and retain the returned number-letter pair wherever downstream steps need an auditable mapping.
What you can do with it
Build spreadsheet ranges
Turn a calculated column position into letters before composing a formula or an A1-style range.
Map imported headers
Convert a visible column letter into the numeric position required by a CSV or worksheet processing routine.
Validate user configuration
Normalize a configured column reference and reject malformed or non-positive values before a job starts.
FAQ
What does the conversion cost?
Interactive browser use is free. Each API request costs $0.002.
Are lowercase column letters accepted?
Yes. Lowercase letters are accepted and returned as normalized uppercase letters.
Can I enter a complete cell reference such as AA12?
No. Enter only the column letters, such as AA. Cell row numbers and absolute-reference symbols are invalid.
Why are zero and negative numbers rejected?
Spreadsheet columns use one-based numbering, so the first valid column is 1, represented by A.
Does the converter stop at Excel column XFD?
No. It implements the general spreadsheet letter-number notation. Apply a separate worksheet-version limit if your destination requires one.
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/data/excel-column-letter-convert \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"reference":"AA"}'const res = await fetch("https://api.kit.forhosting.com/data/excel-column-letter-convert", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"reference": "AA"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/data/excel-column-letter-convert",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"reference": "AA"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/data/excel-column-letter-convert", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"reference":"AA"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"reference":"AA"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/data/excel-column-letter-convert", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"reference": "AA"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "data.excel_column_letter_convert",
"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_mb | 25 |
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. |