What the A1Z26 cipher is
A1Z26 is the plainest way to turn words into numbers. Each letter becomes its position in the alphabet:
| A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
“Hello” becomes 8, 5, 12, 12, 15. You will find it in puzzle books, escape rooms, geocaches, scavenger hunts and the end credits of more than one cartoon. It is also a handy first step for children learning how codes work.
How to use the tool
- Type your message into Text on the left. The numbers appear in Numbers on the right.
- To decode, paste numbers into Numbers. The letters appear on the left.
- Choose how letters are joined in Between letters:
- Hyphen: 8-9
- Space: 8 9 (words split by /)
- Comma: 8,9
- Dot: 8.9
- Press Copy above either box, or Clear to start again.
When encoding, words are separated by a single space. If you choose spaces between letters, words are separated by a slash instead, so you can still see where each word ends. Line breaks are kept.
Characters that are not letters, such as ! or ?, are kept in place as their own item. So Hi! becomes 8-9-!, and it decodes back to HI!.
Examples
These were produced by the tool on this page.
| Text | Between letters | Numbers |
|---|---|---|
| Hello World | Hyphen | 8-5-12-12-15 23-15-18-12-4 |
| Hello World | Space | 8 5 12 12 15 / 23 15 18 12 4 |
| Code | Comma | 3,15,4,5 |
| I love you | Hyphen | 9 12-15-22-5 25-15-21 |
| Happy birthday | Dot | 8.1.16.16.25 2.9.18.20.8.4.1.25 |
| Hi! | Hyphen | 8-9-! |
And in the other direction:
| Numbers | Decoded |
|---|---|
19.5.3.18.5.20 |
SECRET |
20 8 5 / 5 14 4 |
THE END |
3,15,4,5 |
CODE |
27-1-2 |
[27]AB |
The last row shows what happens to a number outside 1 to 26. It cannot be a letter, so it is kept in brackets.
How the decoder reads your numbers
The decoder is flexible about the format you paste:
- If there is a slash anywhere in the text, slashes separate words and spaces separate letters.
- Otherwise, spaces separate words, and hyphens, commas or dots separate letters inside a word.
- Each number from 1 to 26 becomes a capital letter. Anything else is kept as it is.
This matters because A1Z26 has one weak spot: without separators it is ambiguous. 1 2 is AB, but 12 is L. Always put something between the numbers when you write a message, or the reader has to guess.
Variations you may meet
Puzzle makers often bend the rule a little. Watch for these:
- Reversed alphabet. Some puzzles count from the other end, so Z is 1 and A is 26. To solve one, subtract each number from 27 and decode the result here.
- Zero-based. Programmers sometimes start at A = 0. Add 1 to each number first.
- Combined with a shift. A message can be shifted with a Caesar cipher before it is turned into numbers. Decode the numbers here, then try the shifts on the Caesar page.
- Two-digit padding. Some puzzles write 01, 02 and so on. The decoder reads 05 as 5, so these work as they are.
Limits
A1Z26 is a teaching and puzzle code. It is not encryption. The pattern is easy to recognise, since every number falls between 1 and 26, and the alphabet is the only key. Do not use it to protect anything private.
Only the 26 English letters are converted. Accented letters such as é, and letters from other alphabets, are kept as they are.
Other ways to do it
In Excel or Google Sheets, =CODE(UPPER(A1))-64 gives the number of a single letter in cell A1, and =CHAR(B1+64) turns a number in B1 back into a capital letter. You would need one cell per letter for a full word.
In JavaScript, this line converts a phrase:
'Hello World'.toUpperCase().split('').map(c => c >= 'A' && c <= 'Z' ? c.charCodeAt(0) - 64 : c).join(' ')
It returns 8 5 12 12 15 23 15 18 12 4, with a wider gap where the space was.
Related tools
For a code that shifts letters instead of numbering them, try the Caesar cipher or ROT13. To spell words clearly out loud, use the NATO phonetic alphabet translator.