Every letter as its number in the alphabet

A1Z26 cipher

Encode and decode the A1Z26 cipher, in which A is 1, B is 2 and Z is 26. HELLO WORLD becomes8-5-12-12-15 23-15-18-12-4 and reads back as HELLO WORLD. The tool writes a hyphen between the letters of a word and a space between words, and reads the same form back.

How to use it

  1. Type in the left box. Each letter becomes its number in the alphabet, letters of a word joined with a hyphen and words separated by a space.

  2. Paste numbers into the right box to read them back. Numbers outside 1 to 26 are ignored, never guessed at.

  3. The tool writes and reads hyphens between the letters of a word and spaces between words. If your puzzle uses dots or slashes, type that character into the separator field and the tool reads and writes it instead.

Counting the alphabet

A1Z26 is the code every child invents on the first afternoon of trying to write secretly: number the alphabet and write the numbers. Its whole difficulty is the separator. With one, the alphabet's first six letters are 1-2-3-4-5-6 and there is nothing to work out; run the same digits together and the reading forks as soon as the numbers pass 9, because 12 is L but 1 followed by 2 is AB. The convention that settled is a hyphen between the letters of a word and a space between words, and that is what the tool writes and reads. A puzzle written with dots or slashes, such as3.1.2, reads the same way once the dots are replaced with hyphens.

The code appears wherever puzzles are set: in escape rooms, in geocache descriptions, in the back pages of children's magazines, and as the first layer of a longer puzzle whose numbers then go into a book cipher or a coordinate. The fingerprint is unmistakable once seen: numbers that never exceed 26, joined by hyphens, with the number 5 more frequent than any other because E is the commonest letter.

It is worth telling apart from ASCII codes, which also turn letters into numbers but number every character of a computer's table, so that capital A is 65 and lowercase a is 97. A message of numbers between 65 and 122 is ASCII; one of numbers up to 26 is A1Z26. The middle of the alphabet, M, is 13, which is a quick check when guessing which system a puzzle uses.

Table

The 26 letters and their numbers, generated by index.

26 entries, generated by the code
LetterNumber
A1
B2
C3
D4
E5
F6
G7
H8
I9
J10
K11
L12
M13
N14
O15
P16
Q17
R18
S19
T20
U21
V22
W23
X24
Y25
Z26

Frequently asked

What is the A1Z26 cipher?

The simplest number code: every letter is replaced by its position in the alphabet, A is 1, B is 2, Z is 26. HELLO WORLD becomes 8-5-12-12-15 23-15-18-12-4. The name is the rule itself, A equals 1 and Z equals 26.

Why the hyphens?

Without a separator the numbers run together and the message becomes ambiguous: the digits 112 can be read as K B, as A L or as A A B, and nothing in the string says which. A hyphen between letters and a space between words removes the doubt. Written with spaces alone, 8 9, letters and words can no longer be told apart, so the tool writes and reads hyphens.

Where does it turn up?

In puzzle books, escape rooms, geocaching and scavenger hunts, in the cipher wheels of children's magazines, and as the first step of many multi-layer puzzles, where the numbers then feed a second cipher. Anyone who has seen it once recognises a string of numbers between 1 and 26 with hyphens.

How is it different from ASCII codes?

Both replace letters with numbers, but ASCII numbers every character of a computer's table, where A is 65 and a is 97, while A1Z26 numbers only the 26 letters from 1. A message full of numbers between 65 and 122 is ASCII; one full of numbers up to 26 is A1Z26.

Can it be decoded without the rule?

Easily. Numbers that never exceed 26, joined with separators, are the fingerprint, and the frequency of the number 5 gives away the E. It is a code for play and for teaching the idea that letters can be counted, not a way to keep anything secret.