Worked Examples: Exact Results and Input Limits
These encode/decode cases contrast alphabet mappings with character encodings and their input limits.
How these examples were produced
Outputs are generated by this page's own codec, src/lib/a1z26-cipher.ts, and verified in the 2026-11-16 site release (examples recomputed on each build) by tests/a1z26-cipher.test.ts. Cases were selected to show edge behaviour. A1Z26 uses uppercase ASCII code minus 64; A0Z25 subtracts 65; Reversed uses 27 minus the A1Z26 position. ASCII uses character codes and UTF-8 binary uses encoded bytes. Errors are displayed verbatim and empty results are labeled.
| Input | Mode | Result or error | Explanation |
|---|---|---|---|
| HELLO | encode / A1Z26 | 8-5-12-12-15 | A letter becomes its alphabet position. |
| HI THERE | encode / A1Z26 | 8-9 / 20-8-5-18-5 | Whitespace becomes a slash between words. |
| AZ | encode / A1Z26 | 1-26 | Both alphabet endpoints. |
| 8,5-12 12,15 | decode / A1Z26 | HELLO | Mixed separators are accepted. |
| 1 2 | decode / A1Z26 | AB | Two tokens become AB. |
| 12 | decode / A1Z26 | L | A single token becomes L. |
| 08 05 | decode / A1Z26 | HE | Two-digit zero padding is accepted. |
| 001 | decode / A1Z26 | Error: Word 1: “001” is not a single valid code. Use separators between numbers; unseparated strings are not guessed. | Three-digit padding is rejected. |
| 0 | decode / A1Z26 | Error: Word 1: value 0 is outside 1–26. Check the selected format. | Standard numbering starts at 1. |
| 27 | decode / A1Z26 | Error: Word 1: value 27 is outside 1–26. Check the selected format. | There is no letter 27. |
| HELLO! | encode / A1Z26 | Error: This format accepts A–Z and whitespace only. Remove digits, punctuation and non-English letters, or choose UTF-8 binary. | Punctuation causes an error rather than being ignored. |
| 0 25 | decode / A0Z25 | AZ | Choose A0Z25 explicitly for zero-based positions. |
| 26 1 | decode / Reversed | AZ | Reversed maps 26 to A and 1 to Z. |
| 65 66 | decode / ASCII | AB | ASCII uses decimal character codes. |
| 01000001 | decode / UTF-8 binary | A | Binary mode requires eight bits per UTF-8 byte. |
| 1000001 | decode / UTF-8 binary | Error: Byte 1 must contain exactly eight 0s or 1s. Separate each byte with a space. | Seven-bit groups are rejected here. |
| (empty input) | decode / A1Z26 | (empty result) | Empty input returns an empty result. |
Numeric Cipher Variants: A1Z26, A0Z25 and Reversed
A1Z26 maps A=1 through Z=26. A0Z25 maps A=0 through Z=25. Reversed maps A=26 through Z=1. Choose the method before encoding or decoding: the same 1 means A, B or Z respectively. There is no arbitrary offset or custom alphabet control.
ASCII and Binary Are Character Encodings
ASCII decimal preserves letter case and uses A=65; Binary encodes UTF-8 bytes in eight-bit groups. These are separate methods, not shifted alphabet positions. Alphabet modes reject punctuation, digits and accented letters instead of removing them.
What is the A1Z26 Cipher?
The A1Z26 cipher is one of the simplest and most recognizable substitution cipher systems in existence. Its name encodes its own rule: A equals 1, Z equals 26. Every letter of the English alphabet is replaced by its ordinal position number. B becomes 2, C becomes 3, D becomes 4, and the pattern continues all the way through the alphabet.
For a practice puzzle, encode a short clue with A1Z26 and supply the alphabet chart. Keep slash word boundaries so the decoded clue retains its word breaks.
From a cryptographic perspective, A1Z26 offers zero security since the encoding scheme is universally known and contains no secret key. It is properly classified as an encoding rather than encryption. However, its transparency is precisely what makes it useful as a pedagogical tool and a building block for understanding more complex cipher systems.
How the A1Z26 Cipher Works
The A1Z26 encoding and decoding process is mathematically trivial, which is exactly why it is so accessible:
- Encoding (letters to numbers): Take each letter of your message and find its position in the alphabet. A is position 1, B is position 2, and so on. The word HELLO becomes 8-5-12-12-15. The output uses hyphens between letter values.
- Decoding (numbers to letters): Take each number in the sequence and look up which letter occupies that position. The number 8 maps to H (the 8th letter), 5 maps to E, 12 maps to L, and 15 maps to O.
- Non-alphabetic handling: Whitespace runs collapse into one / word boundary during encoding. Digits, punctuation and accented letters are rejected. When decoding, use / for word breaks; spaces only separate numbers, and double spaces do not create a word break.
The mathematical formula for encoding is straightforward: for any uppercase letter with ASCII code C, the A1Z26 value equals C minus 64. For lowercase letters, it equals C minus 96. Decoding reverses this: add 64 to get the uppercase ASCII code, then convert to a character.
What This Converter Accepts — and What It Rejects
This tool deliberately validates input rather than scraping whatever it can. That means a clean result you can trust, and a clear message when something is off — never a wrong letter pulled out of a bad input. Here is exactly where the line is drawn for the A1Z26 method:
- Encoding accepts A–Z and whitespace only. Case is ignored (a and A both give 1). Multiple words are fine — each whitespace run becomes one slash word boundary. Digits, punctuation, and accented or non-English letters are not accepted: the tool answers
“This format accepts A–Z and whitespace only. Remove digits, punctuation and non-English letters, or choose UTF-8 binary.” - Decoding accepts whole numbers 1 through 26, separated by spaces, commas, or hyphens, with a slash ( / ) marking a word break. A number outside that range is refused — decoding
27returns“Word 1: value 27 is outside 1–26. Check the selected format.”, and0is refused the same way. - It will not guess run-together numbers. An unseparated string like
1215is ambiguous, so it is rejected rather than interpreted (see the common mistake below).
If you actually need to encode digits, punctuation, or symbols, that is outside A1Z26 by definition — a byte-level scheme such as ASCII or binary is the right tool, and the linked comparison shows when to reach for each.
A Common Mistake: Running the Numbers Together
A common A1Z26 pitfall is writing an encoded message with no separators — for example 1215 for the word LO. It looks compact, but it is genuinely ambiguous: 1215 could mean 12-15 (LO), or 1-2-1-5 (ABAE), or 12-1-5 (LAE), among others. There is no way to recover the intended split from the digits alone.
Because of that, this decoder refuses to guess. Enter 1215 in decode mode and you get “Word 1: “1215” is not a single valid code. Use separators between numbers; unseparated strings are not guessed.” The fix is simple: always put a space, comma, or hyphen between each number when you encode — write 12-15, not 1215. When you encode with the tool above, it does this for you automatically, which is the safest way to produce a message someone else can decode without ambiguity.
For the full background on why separators matter and how A1Z26 compares to other simple ciphers, see the complete A1Z26 cipher guide.
A1Z26 Cipher Practice: Hints and Word Breaks
Encode a short hint, then decode it with the slash boundaries intact. Compare the same sequence after removing slashes to see why word boundaries matter. Use the reference chart below to check each position manually.
A1Z26 Alphabet Reference Chart
| Letter | Number | Letter | Number |
|---|---|---|---|
| A | 1 | N | 14 |
| B | 2 | O | 15 |
| C | 3 | P | 16 |
| D | 4 | Q | 17 |
| E | 5 | R | 18 |
| F | 6 | S | 19 |
| G | 7 | T | 20 |
| H | 8 | U | 21 |
| I | 9 | V | 22 |
| J | 10 | W | 23 |
| K | 11 | X | 24 |
| L | 12 | Y | 25 |
| M | 13 | Z | 26 |