Tool to convert letters to numbers and vice versa using the alphanumeric code A1Z26 (A=1, B=2, C=3).
Letter Number Code (A1Z26) A=1, B=2, C=3 - dCode
Tag(s) : Substitution Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Letter-to-Number Cipher (or Number-to-Letter Cipher or numbered alphabet) consists in replacing each letter by its position in the alphabet, for example A=1, B=2, Z=26, hence its over name A1Z26.
A1Z26 encryption requires to count the positions/ranks of letters in the alphabet. If it is the Latin alphabet of 26 characters here is the correspondence table letter ↔ number/value:
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
Replace each letter with its position in the alphabet (A = 1, B = 2, … Z = 26) and use a separator character to space the numbers.
Example: DCODE is encrypted 4-3-15-4-5 by alphanumeric substitution
Often the space character is translated with the number 0
Decryption requires taking each number and replace it with the letter of same position in the alphabet: 1 = A, 2 = B, … 26 = Z, here is the corresponding table:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
Example: 1.12.16.8.1.2.5.20 gives ALPHABET
The A1Z26 cipher is a very simple and easily decipherable cipher. It is mainly used for educational or recreational purposes.
The crypted message is made of numbers between 1 and 26, sometimes the number 0 is used to code a space.
Numbers are usually separated by spaces or dashes.
The digit 5 for E is supposed to appear regularly for an English text.
This encryption is sometimes called alphanumeric code.
If the alphabet is shifted, it is common for clues of the form letter equals number (K=7) to be provided (common principle of cryptogram type games).
Shift of numbers: the alphabet can start with A = 0 (A0Z25) or A = 1, but also A = 65 or A = 97 (ASCII code).
Use of a supplementary character for space (often 0, more rarely 27)
Use of leading zeros to be able to concatenate numbers AB = 0102, else AB = 12 and 12 = L.
Use of a personalized, shifted abecedary (Caesar code) or even an inversion of the alphabet (A=26, Z=1)
Use of modulo 26 in order to get 1=A,2=B,…26=Z then 27=A, 28=B etc.
The A1Z26 encoding/decoding algorithm is as follows:// Pseudo code
function encrypt_A1Z26(text) {
dictionary = {"A":1, "B":2, . . ., "Z":26}
ciphertext = ""
foreach (letter in text) {
ciphertext += dictionary.replace(letter) + "-"
}
return ciphertext
}
function decrypt_A1Z26(text) {
dictionary = {1:"A", 2:"B", . . ., 26:"Z"}
text.split("-")
plaintext = ""
foreach (number in text) {
plaintext += dictionary.replace(number)
}
return plaintext
}
// Python
def encode_a1z26(text):
return " ".join(str(ord(c) - 64) for c in text.upper() if c.isalpha())
def decode_a1z26(numbers):
return "".join(chr(int(n) + 64) for n in numbers.split())
dCode retains ownership of the "Letter Number Code (A1Z26) A=1, B=2, C=3" source code. Any algorithm for the "Letter Number Code (A1Z26) A=1, B=2, C=3" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Letter Number Code (A1Z26) A=1, B=2, C=3" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Letter Number Code (A1Z26) A=1, B=2, C=3" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Letter Number Code (A1Z26) A=1, B=2, C=3" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Letter Number Code (A1Z26) A=1, B=2, C=3 on dCode.fr [online website], retrieved on 2025-04-20,