Letters to Numbers Logo
Back to Blog

By John Reed · May 14, 2026

What is the A0Z25 Cipher?

The A0Z25 Cipher is a zero-indexed letter-to-number encoding system where each letter of the alphabet maps to a value from 0 to 25 — A=0, B=1, all the way to Z=25. Unlike the traditional A1Z26 cipher, the A0Z25 cipher starts counting from zero, making it the preferred choice for programmers, cryptographers, and anyone working with cipher algorithms that rely on modular arithmetic.

What is the A0Z25 Cipher?

The A0Z25 cipher is a simple substitution cipher that assigns each letter of the alphabet a number starting from zero. A equals 0, B equals 1, C equals 2, and so on until Z equals 25. This creates a direct mapping between the 26 letters and the numbers 0–25.

Zero-based indexing aligns perfectly with how most programming languages handle arrays and strings. In Python, JavaScript, C, and Java, the first element of an array is always at index 0 — so A=0 feels natural in code. When you implement a Caesar cipher or Vigenère cipher in any of those languages, you are almost certainly working with A0Z25 arithmetic internally, even if you call it something else.

The name "A0Z25" directly describes the mapping: A maps to 0, and Z maps to 25. You may also see this written as "zero-indexed alphabet encoding" or "0-indexed letter substitution." All refer to the same system.

To encode or decode messages right now, use our free A0Z25 Cipher Translator or the A0Z25 Decoder.

Complete A0Z25 Reference Chart

The complete A0Z25 mapping for all 26 letters:

A=0
B=1
C=2
D=3
E=4
F=5
G=6
H=7
I=8
J=9
K=10
L=11
M=12
N=13
O=14
P=15
Q=16
R=17
S=18
T=19
U=20
V=21
W=22
X=23
Y=24
Z=25

For a printable version, see our A0Z25 Converter, which lets you download the full chart alongside your encoded output.

A0Z25 vs A1Z26: Key Differences

Both ciphers convert letters to numbers, but the starting index changes everything for practical use:

PropertyA0Z25A1Z26
A equals01
Z equals2526
Value range0–251–26
Mod 26 arithmeticWorks directlyRequires –1 adjustment
Array index matchYes (all major languages)No
Common in puzzlesCTF, cryptography tasksEscape rooms, casual ciphers
Caesar cipher formulashift = (A0Z25_value + n) mod 26Requires (A1Z26_value – 1 + n) mod 26

For general-purpose puzzle solving where people are just counting letters (A is the 1st letter, so A=1), A1Z26 is more intuitive. For anything involving code, algorithms, or cipher math, A0Z25 is the cleaner choice. Our A1Z26 Decoder and Encoder handles the one-based variant if you need to switch between them.

Why Zero-Based Indexing?

Zero-based indexing is the standard in computer science for three concrete reasons:

  • Array access: The first element of an array is at index 0 in Python, JavaScript, C, and Java. alphabet[0] gives you A, not alphabet[1].
  • Modular arithmetic: The Caesar cipher shift formula is (value + shift) % 26. With A0Z25 this works directly. With A1Z26 you need to subtract 1, apply the shift, take mod 26, then add 1 back — three extra steps every time.
  • Memory offsets: Contiguous memory blocks start at offset 0 from the base address. Zero-indexed encoding reflects how CPUs actually address data, which is why C strings are zero-indexed.

The trade-off is that zero-based indexing is less intuitive to humans who count from 1. "A is the first letter, so A should be 1" is a natural assumption. This is exactly why A1Z26 remains more common in escape rooms and casual puzzles aimed at non-programmers.

Practical Examples

Word: HELLO

H=7, E=4, L=11, L=11, O=14

Encoded: 7-4-11-11-14

Word: CODE

C=2, O=14, D=3, E=4

Encoded: 2-14-3-4

Caesar cipher: HELLO shifted by 3 (A0Z25)

(7+3)%26=10→K, (4+3)%26=7→H, (11+3)%26=14→O, (11+3)%26=14→O, (14+3)%26=17→R

Encrypted: KHOOR

That third example is exactly how the Caesar cipher decoder works internally — A0Z25 arithmetic with a mod 26 shift.

Real-World Uses

The A0Z25 cipher appears across several practical contexts, most of them technical:

CTF (Capture The Flag) Competitions

CTF challenges frequently encode flags using A0Z25, sometimes layered with XOR or Caesar shifts. Because the encoding aligns with Python string indexing, participants can decode it in one line: chr(n + 65). Recognizing A0Z25 quickly is a core skill for CTF players — if you see numbers 0–25 in a challenge, A0Z25 is the first thing to try. Our cipher identifier can help narrow down what encoding you're looking at.

Cryptography and Cipher Algorithms

The Caesar cipher, Vigenère cipher, Atbash cipher, and ROT13 all operate on A0Z25 arithmetic internally. When you apply a Caesar shift, you are computing (letter_index + shift) mod 26 — that's A0Z25. Our Atbash cipher decoder and Caesar cipher tools both use this system under the hood.

Computer Science Education

University courses on algorithms and data structures use A0Z25 when teaching string manipulation. Converting a character to its zero-indexed position (ord(c) - ord('A') in Python) is a standard exercise that appears in virtually every intro CS curriculum.

Escape Rooms and Puzzle Games

Puzzle designers targeting technical audiences use A0Z25 to add difficulty — casual solvers expect A=1, so seeing A=0 adds a layer of misdirection. Geocaching puzzles with coordinate ciphers also use A0Z25, especially when coordinates must fit within a specific numerical range that the 1–26 mapping would violate. See our escape room letter codes guide for a full breakdown of which cipher a puzzle is likely using.

Skip Cipher Variants

The skip cipher and other transposition-based systems sometimes use A0Z25 as their base encoding before applying the skip pattern. If you're decoding a skip cipher and the numbers don't map cleanly to A1Z26, switching to A0Z25 is the next thing to try.

How to Decode A0Z25

Decoding reverses the encoding. Add 65 to each number and convert the result from its ASCII decimal value to a letter. ASCII decimal 65 = A, 66 = B, and so on.

Example: decode 7-4-11-11-14

  • 7 + 65 = 72 → H
  • 4 + 65 = 69 → E
  • 11 + 65 = 76 → L
  • 11 + 65 = 76 → L
  • 14 + 65 = 79 → O

Result: HELLO

In Python: ''.join(chr(n + 65) for n in [7, 4, 11, 11, 14]) returns 'HELLO'.

Use our free A0Z25 decoder to paste any sequence of numbers and get the decoded text instantly — no code required.

If you work with A0Z25, these related systems and tools are worth knowing:

Further reading on related ciphers:

Encode or Decode A0Z25 Now

Paste any text or number sequence into our free converter. Select "Zero-based (A0Z25)" and get instant results.

Frequently Asked Questions

What is the A0Z25 cipher?

The A0Z25 cipher maps A=0, B=1, C=2 … Z=25. It uses zero-based indexing, matching how programming languages number array positions and string characters.

What is the difference between A0Z25 and A1Z26?

A1Z26 maps A=1 through Z=26. A0Z25 maps A=0 through Z=25. A0Z25 aligns with zero-based array indexing in Python, JavaScript, C, and Java, making cipher math (mod 26) work without extra steps.

Where is A0Z25 used in the real world?

A0Z25 is used in computer science education, CTF competitions, escape room puzzles, geocaching, and as the internal arithmetic basis for cipher algorithms like Caesar and Vigenère.

How do you decode an A0Z25 message?

Add 65 to each number and convert to an ASCII character. Example: 7→72→H, 4→69→E, 11→76→L, 11→76→L, 14→79→O → HELLO. In Python: chr(n + 65) for each number n.