The A1Z26 cipher is a basic substitution cipher that swaps every letter for its position in the English alphabet. It is widely used in puzzle games, escape rooms, geocaching, and beginner cryptography lessons because it is easy to learn yet still hides plain text from a casual glance. This free tool encodes text into numbers and decodes numbers back into letters instantly, with no account and no upload.
How it works
Encoding maps each letter to a number from 1 to 26: A=1, B=2, C=3, … Z=26. The mapping is case-insensitive, so A and a both produce 1. Within a single word the numbers are joined with hyphens, and a space separates one word from the next. Any character that is not a letter — a digit, comma, or symbol — passes through unchanged.
Decoding reverses the process. Each hyphen-separated number is converted back to its letter using letter = char(96 + n), producing lowercase output. Numbers outside the 1–26 range, or items that are not whole numbers, are left exactly as typed so nothing is silently lost.
Example
Encode the word GERA:
- G is the 7th letter → 7
- E is the 5th letter → 5
- R is the 18th letter → 18
- A is the 1st letter → 1
Joined with hyphens, GERA becomes 7-5-18-1. Decoding 7-5-18-1 returns gera.
| Letter | Number | Letter | Number |
|---|---|---|---|
| A | 1 | N | 14 |
| E | 5 | R | 18 |
| G | 7 | Z | 26 |
Everything runs locally in your browser — your text is never sent to a server.