Base26 Encode/Decode
Encode integers to Base26 letters (A-Z) or decode Base26 strings back to numbers. Supports standard and bijective (Excel column) schemes.
Batch Mode (multiple values)
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.
Formulas
The standard Base26 encoding treats the alphabet as digits 0 - 25 in a positional numeral system with radix 26.
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.
where di ranges from 1 (A) to 26 (Z). To encode, repeatedly subtract 1 then take modulo 26.
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
| Decimal | Standard Base26 (A=0) | Bijective Base26 (A=1) | Use Case |
|---|---|---|---|
| 0 | A | - | Zero value (standard only) |
| 1 | B | A | First bijective value |
| 9 | J | I | Single digit |
| 25 | Z | Y | Last single-letter standard |
| 26 | BA | Z | Last single-letter bijective |
| 27 | BB | AA | First two-letter bijective |
| 51 | BZ | AY | Mid two-letter range |
| 255 | JV | IU | Byte max value |
| 256 | JW | IV | Excel max column (2003) |
| 702 | BAA | ZZ | Two-letter bijective limit |
| 703 | BAB | AAA | First three-letter bijective |
| 1000 | BMM | ALL | Common benchmark |
| 2048 | CAS | BZR | Power of 2 |
| 16384 | XFE | XFD | Excel max column (2007+) |
| 18278 | BAAA | ZZZ | Three-letter bijective limit |
| 65535 | DBBF | DAAE | 16-bit unsigned max |
| 456976 | ZZZZ | YZZS | Four-letter standard limit |
| 475254 | BAAAA | ZZZZ | Four-letter bijective limit |
| 1000000 | CBXLQ | BAWLP | One million |
| 16777216 | RBRDHQ | QAQCGP | 24-bit color space |