Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

A1Z26 Cipher: Letters to Numbers and Back

Convert letters to their position in the alphabet (A = 1, B = 2 … Z = 26) and numbers back to letters. Choose dashes, spaces or commas between the numbers.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up
0 chars
A1Z26
Runs in your browser. Nothing is uploaded. Tip: run it twice to get the original back

How to use the A1Z26 (letters ↔ numbers) tool#

  1. Choose Letters → Numbers or Numbers → Letters.
  2. Type or paste. Each letter becomes its number; letters in a word are joined with the chosen Separator.
  3. Words are separated by a space (or by / when the separator is a space).
  4. When decoding, numbers outside 1–26 show as ?. Copy the result when you are done.

Examples#

Letters to numbers

Input
Hello World
Output
8-5-12-12-15 23-15-18-12-4

H is the 8th letter, E the 5th, L the 12th, O the 15th.

Numbers to letters

Input
20-8-1-14-11-19
Output
THANKS

20 = T, 8 = H, 1 = A, 14 = N, 11 = K, 19 = S.

Space-separated numbers

Input
dev tools
Output
4 5 22 / 20 15 15 12 19

With spaces between numbers, words are separated by / so they stay readable.

What is the A1Z26 cipher?#

A1Z26 replaces every letter with its position in the alphabet: A = 1, B = 2, and so on up to Z = 26. The name says it all: "A is 1, Z is 26". It is one of the simplest substitution ciphers and a favourite in puzzle hunts, escape rooms, geocaching and TV shows such as Gravity Falls, whose end credits hid A1Z26 messages.

The A1Z26 table#

ABCDEFGHIJKLM
12345678910111213
NOPQRSTUVWXYZ
14151617181920212223242526

Why separators matter#

Without separators, A1Z26 is ambiguous: 123 could be ABC (1-2-3), LC (12-3) or AW (1-23). That is why numbers are written with dashes (1-2-3), spaces or commas, and words are kept apart with a wider gap or a slash.

Variations you may meet#

  • A0Z25: counting from zero (A = 0), common in programming and in the maths of the Caesar and affine ciphers.
  • Reversed A1Z26: Z = 1 … A = 26, which is A1Z26 combined with the Atbash cipher.
  • Combined puzzles: A1Z26 is often the last step after another cipher, for example "decode the Caesar, then turn the numbers into letters".

A1Z26 hides nothing. Anyone who sees numbers between 1 and 26 will try it first. Use it for fun and puzzles only.

A1Z26 in code#

javascript
const encode = (text) =>  text.toUpperCase().split(/\s+/)    .map((w) => [...w].filter((c) => c >= 'A' && c <= 'Z').map((c) => c.charCodeAt(0) - 64).join('-'))    .join(' '); const decode = (code) =>  code.split(' ').map((w) => w.split('-').map((n) => String.fromCharCode(64 + Number(n))).join('')).join(' '); encode('Hello World'); // "8-5-12-12-15 23-15-18-12-4"

Common errors and fixes#

  • Some letters decode as ?

    Those numbers are outside 1–26. Check for typos, or for a variant that starts at 0 (A0Z25): in that case add 1 to every number.

  • The decoded words run together

    Separate words with a space when numbers use dashes or commas, or with / when numbers are separated by spaces.

  • Numbers written together, like 81212

    Without separators the split is ambiguous. Try likely splits by hand: 8-12-12 (HLL) is more likely than 81-2-12, since numbers stop at 26.

Frequently asked questions#

What does A1Z26 mean?

A = 1 and Z = 26: each letter is replaced by its position in the alphabet.

How do I decode numbers to letters?

Choose Numbers → Letters and paste the numbers. 1 becomes A, 2 becomes B, up to 26 for Z.

Is A1Z26 the same as the alphabet number code?

Yes. "Letter number code", "number alphabet cipher" and A1Z26 all describe the same idea.

Is my text uploaded?

No. Everything runs in your browser.

Your next tool is one search away.

Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

Browse all tools

Tip: press Ctrl D to bookmark dev247.