Phillips Cipher Encoder/Decoder

Choose encode or decode, enter a keyword and your text to run the Phillips cipher.

Result

GZZGMT
8
Encode

How it is calculated

The tool builds a 5×5 square from the keyword: the keyword's letters come first (repeats dropped, J treated as I), then the rest of the alphabet fills the grid. From that first square it makes 8 grids in total: grids 2 to 5 each move the top row to the bottom of the previous grid, and grids 6 to 8 each move the second row to the bottom. The text is cleaned to letters only, upper-cased, with J changed to I, then cut into blocks of five. Block 1 uses grid 1, block 2 grid 2, and so on, returning to grid 1 after block 8. To encode, each letter is replaced by the one one row down and one column right, wrapping at the edges; decoding goes one up and one left. Spaces, digits and punctuation are dropped.

Worked example

Keyword PHILLIPS gives the keyed letters P, H, I, L, S followed by the remaining alphabet, so grid 1 reads PHILS / ABCDE / FGKMN / OQRTU / VWXYZ. Encode ATTACK, which splits into the block ATTAC and the single letter K. In grid 1, A moves down-right to G, T to Z, T to Z, A to G and C to M. K sits in block 2, so grid 2 (top row moved to the bottom) applies, and K becomes T. The ciphertext is GZZGMT, and the tool reports that it used 8 grids. Decoding GZZGMT with the same keyword returns ATTACK.

Try this example →

Common mistakes

  • Decoding with a different keyword or in encode mode. The same keyword and the 8-grid order must be used, otherwise the output is unrelated garbage rather than an error.
  • Expecting J to survive. J and I share one cell, so J is turned into I before encoding and a decoded message may show I where the original had J.
  • Expecting spaces, digits or punctuation to be kept. They are removed, so the output is one unbroken run of letters and word breaks must be restored by hand.
  • Breaking the five-letter block rhythm by deleting or adding a letter in the ciphertext. Each block picks its grid by position, so one missing letter shifts every later block onto the wrong grid.
  • Treating this as secure encryption. It is a classical substitution cipher meant for puzzles and study, and it should not protect anything sensitive.

About this calculator

The Phillips cipher is a historical field cipher used by the US Army in the early 20th century, built on the Polybius square — a grid that maps letters to row-and-column coordinate pairs. Instead of using a single grid like the basic Polybius or Playfair ciphers, the Phillips system cycles through eight different keyed 5×5 squares, applying a new square to each successive five-letter block of plaintext, which makes simple frequency analysis far less effective than it would be against a single-square substitution.

This tool encodes or decodes text using the Phillips method from a keyword, reproducing the eight-square construction and letter-rotation logic of the original system. It's useful for cryptography enthusiasts, students of classical and military cipher history, and anyone working through historical cryptanalysis exercises who wants to see exactly how a Phillips-enciphered message is built or broken down back into plaintext.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators