User Rating 0.0
Total Usage 0 times
Enter a non-negative integer to encode
Result will appear here
Batch Mode (multiple values)
Is this tool helpful?

Your feedback helps us improve.

About

Base26 encoding maps non-negative integers to alphabetic strings using the 26 letters A through Z. Two conventions exist. In the standard scheme, A = 0 and the string length grows at powers of 26. In the bijective scheme used by spreadsheet software, A = 1 and there is no zero digit, which means column 26 is Z, column 27 is AA, and column 702 is ZZ. Confusing the two schemes off by one produces wrong column references in programmatic spreadsheet generation, corrupting cell mappings across entire datasets. This tool computes both representations and detects which scheme an input string corresponds to during decoding.

The encoding handles integers up to JavaScript's safe integer limit of 253 − 1 (9,007,199,254,740,991). For values beyond that threshold, floating-point precision loss makes results unreliable. The tool also supports full text-to-Base26 conversion by encoding each character's Unicode code point individually, useful for obfuscation or educational purposes.

base26 encode decode converter bijective excel column number to letters encoding

Formulas

The standard Base26 encoding treats the alphabet as digits 0 - 25 in a positional numeral system with radix 26.

n = ki=0 di 26i

where di is the numeric value of the i-th letter from the right (A = 0, Z = 25), and k is the string length minus 1.

For bijective Base26 (spreadsheet columns), there is no zero digit. Each position uses values 1 - 26.

n = ki=0 di 26i

where di ranges from 1 (A) to 26 (Z). To encode, repeatedly subtract 1 then take modulo 26.

r = (n 1) mod 26 n n 126

where r is the remainder mapped to the letter at position r in the alphabet, and the quotient becomes the next n. The process repeats until n = 0.

Reference Data

DecimalStandard Base26 (A=0)Bijective Base26 (A=1)Use Case
0A - Zero value (standard only)
1BAFirst bijective value
9JISingle digit
25ZYLast single-letter standard
26BAZLast single-letter bijective
27BBAAFirst two-letter bijective
51BZAYMid two-letter range
255JVIUByte max value
256JWIVExcel max column (2003)
702BAAZZTwo-letter bijective limit
703BABAAAFirst three-letter bijective
1000BMMALLCommon benchmark
2048CASBZRPower of 2
16384XFEXFDExcel max column (2007+)
18278BAAAZZZThree-letter bijective limit
65535DBBFDAAE16-bit unsigned max
456976ZZZZYZZSFour-letter standard limit
475254BAAAAZZZZFour-letter bijective limit
1000000CBXLQBAWLPOne million
16777216RBRDHQQAQCGP24-bit color space

Frequently Asked Questions

Standard Base26 uses A=0 through Z=25, behaving like a normal positional numeral system with leading zeros possible (A = 0, AA = 0×26+0 = 0). Bijective Base26 uses A=1 through Z=26 with no zero digit, so every distinct string maps to a distinct positive integer. Spreadsheet column labels (A, B, …, Z, AA, AB, …) use the bijective system. The practical difference: decimal 26 is "BA" in standard but "Z" in bijective.
Most likely you are mixing up the two schemes. In bijective Base26, column 1 = A, so column numbering starts at 1, not 0. If your code uses zero-indexed arrays, you need to add 1 before encoding or subtract 1 after decoding. A single off-by-one error propagates to every cell reference in a generated spreadsheet, corrupting formulas across the entire workbook.
JavaScript uses IEEE 754 double-precision floats, so integers above 2^53 − 1 (9,007,199,254,740,991) lose precision. The tool rejects inputs above this limit. For the bijective scheme, this maximum corresponds to a 12-letter string. If you need larger values, arbitrary-precision libraries (BigInt) are required.
No. Base26 is defined for non-negative integers only. A negative number has no valid representation in a system with no sign digit. Decimal fractions would require a radix point convention that does not exist in standard Base26. If you need to encode signed values, store the sign separately and encode the absolute value.
Each character in the input string is converted to its Unicode code point (e.g., "A" = 65, "€" = 8364). Each code point is then individually encoded to Base26 using the selected scheme. The results are joined with a configurable delimiter (default: hyphen). Decoding reverses the process: split by delimiter, decode each segment to a number, convert each number to a character via String.fromCodePoint().
Hexavigesimal literally means base-26 and is technically the same radix. However, in practice, "Base26" almost always refers specifically to letter-only encoding (A-Z) without numeric digits, while hexavigesimal in mathematics may use any 26 symbols. The bijective variant is unique to the alphabetic convention and has no direct parallel in standard positional number theory.