Coding and decoding tests measure your ability to understand and apply substitution rules. You'll be given a key that maps letters or symbols, then asked to encode or decode words using that system.

The generator ships 17 cipher systems across four tiers: substitution (letter-to-number, number-to-letter, Atbash, Caesar shift, symbol substitution, vowel-consonant mapping, keyboard shift), transposition (reverse word, skip cipher, rail fence), polyalphabetic (variable shift, Vigenère, ROT13), and special encodings (Polybius square, phone keypad, binary). Combined ciphers at expert difficulty chain two methods.

All codes are generated locally in your browser. Your progress and answers are stored only on your device — we never collect personal data.

Key Patterns & Formats

Letter-to-Number Codes

Each letter is replaced by its position in the alphabet.

A=1, B=2, C=3, ... Z=26

Number-to-Letter Codes

Decode numbers by converting each to its corresponding letter.

1=A, 2=B, 3=C, ... 26=Z

Atbash Cipher

Each letter is replaced by its mirror in the alphabet (A to Z, B to Y, etc.).

A to Z, B to Y, C to X, D to W, E to V, F to U, G to T, H to S, I to R, J to Q, K to P, L to O, M to N

Caesar Cipher

Each letter is shifted by a fixed number of positions in the alphabet.

Shifted letter = (Original position + Shift) mod 26. With shift=3: A→D, B→E, C→F, ..., X→A, Y→B, Z→C

Symbol Substitution

Letters are replaced with symbols according to a given key.

A=@, B=#, C=$, etc. (as specified in key)

Combined Codes

Multiple coding rules are applied in sequence.

Apply Rule 1 to get intermediate result, then apply Rule 2 to get final result

Polybius Square

Letters are encoded as coordinate pairs from a 5x5 grid.

Grid: Row 1 (ABCDE), Row 2 (FGHIK), Row 3 (LMNOP), Row 4 (QRSTU), Row 5 (VWXYZ). A=11, B=12, ... I/J=24, ... Z=55

Variable Shift Cipher

Each letter shifts by its position number (1st +1, 2nd +2, etc.).

Letter at position N shifts forward by N positions. Position 1: +1, Position 2: +2, Position 3: +3, etc.

Vowel-Consonant Code

Vowels and consonants follow different shift rules.

Vowels (A,E,I,O,U) shift by X positions. Consonants shift by Y positions.

Keyboard Cipher

Letters shift along their QWERTY keyboard row.

Top row: QWERTYUIOP, Middle row: ASDFGHJKL, Bottom row: ZXCVBNM. Shift right within each row.

Reverse Word

The word is spelled backwards (transposition, not substitution).

Read letters from right to left. WORD -> DROW

Skip Cipher

Letters are rearranged by taking alternating positions.

Take positions 1,3,5... then 2,4,6... Example: WATER (W1,A2,T3,E4,R5) -> WTR + AE = WTRAE

Solving Strategies

  • Numbers 1-26 (no numbers higher than 26)
  • Pattern follows alphabetical position
  • Often separated by hyphens or spaces
  • Given numbers, asked to find the word
  • Numbers are between 1 and 26
  • Decode by finding the letter at each position
  • Each letter maps to its 'mirror' position
  • A always becomes Z, Z always becomes A

Common Pitfalls

  • Confusing letter positions (common: J=10, not 11)
  • Forgetting alphabet order mid-word
  • Not recognizing double-digit numbers (12 is L, not 1-2)
  • Confusing high numbers (is 20 T or U?)
  • Not recognizing common patterns (15=O, 5=E)
  • Mixing up single and double digit parsing

Frequently Asked Questions

You'll encounter letter-to-number codes (A=1, B=2), reverse alphabet (A=Z, B=Y), shifted alphabets (each letter replaced by one N positions away), and symbol substitutions. Harder levels combine multiple rules.
Government agencies, civil service, banks, military, intelligence services, and organizations requiring security clearance. These tests are common in IBPS, SSC, and other competitive exams in many countries.
First, understand the code rule by examining the key carefully. Apply the rule letter by letter. For complex codes, write down intermediate steps. Check your answer by encoding it back to verify.
Each code system is procedurally generated using random substitution rules. The system selects a cipher type (letter shift, number mapping, reverse alphabet, or symbol substitution), applies it consistently to create encoded words, and generates distractors that contain specific decoding errors. Harder levels combine multiple rules. This ensures every question is unique.

Sources & References

Letter-to-Number Codes

Letter-to-Number Codes
A=1, B=2, C=3, ... Z=26
CAT = 3-1-20
HELLO = 8-5-12-12-15
3-15-4-5 = CODE
Encode the word 'CAT' using letter-to-number coding
  1. 1
    C is the 3rd letter of the alphabetC → 3
  2. 2
    A is the 1st letter of the alphabetA → 1
  3. 3
    T is the 20th letter of the alphabetT → 20

Number-to-Letter Codes

Number-to-Letter Codes
1=A, 2=B, 3=C, ... 26=Z
19-21-14 = SUN
2-15-15-11 = BOOK
23-1-20-5-18 = WATER
Decode the sequence 19-21-14
  1. 1
    19 is the 19th letter of the alphabet = S19 → S
  2. 2
    21 is the 21st letter of the alphabet = U21 → U
  3. 3
    14 is the 14th letter of the alphabet = N14 → N

Atbash Cipher

Atbash Cipher
A to Z, B to Y, C to X, D to W, E to V, F to U, G to T, H to S, I to R, J to Q, K to P, L to O, M to N
HELLO -> SVOOL
CAT -> XZG
WIZVM -> DREAM
Encode 'HELLO' using the Atbash cipher
  1. 1
    H is the 8th letter. Its mirror is the 8th from the end = SH → S
  2. 2
    E is the 5th letter. Its mirror is the 5th from the end = VE → V
  3. 3
    L is the 12th letter. Its mirror is the 12th from the end = OL → O
  4. 4
    L again maps to OL → O
  5. 5
    O is the 15th letter. Its mirror is the 15th from the end = LO → L

Caesar Cipher

Caesar Cipher (Shift +3)
Encode 'HELLO' using a Caesar cipher with shift 3
  1. 1
    H is the 8th letter. Add 3: position 11 = KH → K
  2. 2
    E is the 5th letter. Add 3: position 8 = HE → H
  3. 3
    L is the 12th letter. Add 3: position 15 = OL → O
  4. 4
    L again: position 15 = OL → O
  5. 5
    O is the 15th letter. Add 3: position 18 = RO → R

Symbol Substitution

Symbol Substitution
A=@, B=#, C=$, etc. (as specified in key)
If A=@, B=#, C=$ then ABC = @#$
If X=!, Y=?, Z=* then XYZ = !?*
Decode #@$ using A=@, B=#, C=$ → BAC
Decode '#@$' using the key: A=@, B=#, C=$
  1. 1
    Look up # in the key: B=#, so # = B# → B
  2. 2
    Look up @ in the key: A=@, so @ = A@ → A
  3. 3
    Look up $ in the key: C=$, so $ = C$ → C

Combined Codes

Combined Codes
Apply Rule 1 to get intermediate result, then apply Rule 2 to get final result
Reverse then shift 1: A→Z→A (reverse gives Z, shift gives A)
Shift 2 then reverse: A→C→X (shift gives C, reverse gives X)
Number + 5: A=1+5=6, B=2+5=7, etc.
Encode 'AB' using: first shift +2, then reverse alphabet
  1. 1
    Step 1: Apply shift +2 to A → CA → C
  2. 2
    Step 2: Reverse alphabet on C → X (C is 3rd, X is 3rd from end)C → X
  3. 3
    Step 1: Apply shift +2 to B → DB → D
  4. 4
    Step 2: Reverse alphabet on D → W (D is 4th, W is 4th from end)D → W

Polybius Square

Polybius Square
Grid: Row 1 (ABCDE), Row 2 (FGHIK), Row 3 (LMNOP), Row 4 (QRSTU), Row 5 (VWXYZ). A=11, B=12, ... I/J=24, ... Z=55
CAT -> 13 11 44
HELLO -> 23 15 31 31 34
DOG -> 14 34 22
Encode 'CAT' using the Polybius square
  1. 1
    The grid: Row 1 = ABCDE, Row 2 = FGHIK, Row 3 = LMNOP, Row 4 = QRSTU, Row 5 = VWXYZ5x5 Grid
  2. 2
    C is in Row 1, Column 3 → 13C → 13
  3. 3
    A is in Row 1, Column 1 → 11A → 11
  4. 4
    T is in Row 4, Column 4 → 44T → 44

Variable Shift Cipher

Variable Shift Cipher
Letter at position N shifts forward by N positions. Position 1: +1, Position 2: +2, Position 3: +3, etc.
CAT -> D(C+1) C(A+2) W(T+3) = DCW
HELLO -> I(H+1) G(E+2) O(L+3) P(L+4) T(O+5) = IGOPT
Encode 'CAT' with variable shift (position 1 = +1, position 2 = +2, etc.)
  1. 1
    C is at position 1. Shift by +1: C (3rd letter) + 1 = DC → D
  2. 2
    A is at position 2. Shift by +2: A (1st letter) + 2 = CA → C
  3. 3
    T is at position 3. Shift by +3: T (20th letter) + 3 = WT → W

Vowel-Consonant Code

Vowel-Consonant Code
Vowels (A,E,I,O,U) shift by X positions. Consonants shift by Y positions.
With vowels +1, consonants +2: CAT -> E(C+2) B(A+1) V(T+2) = EBV
WATER -> Y(W+2) B(A+1) V(T+2) F(E+1) T(R+2) = YBVFT
Encode 'CAT' with vowels +1, consonants +2
  1. 1
    C is a consonant. Shift by +2: C (3rd) + 2 = EC → E
  2. 2
    A is a vowel. Shift by +1: A (1st) + 1 = BA → B
  3. 3
    T is a consonant. Shift by +2: T (20th) + 2 = VT → V

Keyboard Cipher

Keyboard Cipher
Top row: QWERTYUIOP, Middle row: ASDFGHJKL, Bottom row: ZXCVBNM. Shift right within each row.
Shift 1: CAT -> V(C->V) S(A->S) Y(T->Y)
Shift 1: DOG -> F(D->F) P(O->P) H(G->H)
Encode 'DOG' with keyboard shift +1 (shift right within each row)
  1. 1
    Keyboard rows: Top = QWERTYUIOP, Middle = ASDFGHJKL, Bottom = ZXCVBNMQWERTY Layout
  2. 2
    D is in middle row (ASDFGHJKL). Shift right by 1 → FD → F
  3. 3
    O is in top row (QWERTYUIOP). Shift right by 1 → PO → P
  4. 4
    G is in middle row (ASDFGHJKL). Shift right by 1 → HG → H

Reverse Word

Reverse Word
Read letters from right to left. WORD -> DROW
WATER -> RETAW
HELLO -> OLLEH
STAR -> RATS
Encode 'WATER' by reversing
  1. 1
    Write the word: W-A-T-E-RWATER
  2. 2
    Read from right to left: R is now firstR
  3. 3
    E is secondRE
  4. 4
    T is thirdRET
  5. 5
    A is fourth, W is lastRETAW

Skip Cipher

Skip Cipher
Take positions 1,3,5... then 2,4,6... Example: WATER (W1,A2,T3,E4,R5) -> WTR + AE = WTRAE
WATER -> WTRAE
HELLO -> HLOEL
STARS -> SASRT
Encode 'WATER' using the skip cipher
  1. 1
    Number the positions: W(1) A(2) T(3) E(4) R(5)WATER
  2. 2
    Extract odd positions (1, 3, 5): W, T, RWTR
  3. 3
    Extract even positions (2, 4): A, EAE
  4. 4
    Combine: odd letters first, then even lettersWTR + AE