Trifid Cipher Decoder

Type the key, set Group size, paste into Code to decode, and three squares of nine hand the message back.

This is a sample. Type or paste your own code over it.

Message

LEAVETHETRIFLEINTHEFRIDGE
No group size? Try every group size

The same key with every group size, scored by how many common English letter pairs the reading has.

SizeReadingScoreUse it
5 LikelyLEAVETHETRIFLEINTHEFRIDGE21.37In use
6 LikelyEMITOFRZBUAUBFUEAJBESRIEY6.10
13 LikelyHECVJOBSEURUAEUESIBARJQHE9.48
2FOGRUBRRCRIKPKTUJEAOSPJPY1.42
3MLNDSURTDUVNGEIIVJCEVIEIY2.95
4KJDYIIAYBSRNPJCFHHENWPIPY4.52
7MLUZHHPBPUIWVUXGPUTEJPLDE1.96
8KFCTEEPYIWTIRIDKOMFIBPPEY3.27
9HQPREEAXLPXUNFKMPEUERVDLR4.59
10MEPREQGVQAUJMEPFCLIKRIDGE4.16
11EEPTQJGYMUSFDQIKGJPESPHDE2.10
12EHDYLJAZFURUGJIEUESIBARJY2.41
14HMIWOOPSEURBAUSPNAZEJMHDP0.93
15MKNZMFPSEUYBDAPIZMFJMPDDI0.93
16KKAZEFPSEB+PAPDWOEKAPPDLR0.93
17JOASEFPSQARADUNWKIBPPEXTI4.90
18MOPSEFDYMP+UUNNVEJUERVDLR3.81
19MFPSHEAYHBSUNIIRJFXRIEXDI4.49
20EFDREMCSOUSIIIPWHLRWRIDGE3.45
25 (whole)OMPYEFGXJUXPIPNRKMSRPAGGI0.00
More options
27th character
  • 25 characters in 5 groups of 5.
  • With the spaces back: leave the trifle in the fridge
The three squares. A cell's number is its layer, its row and its column: the top right of square 2 is 213.

Layer 1

RowColumn 1Column 2Column 3
Row 1PUD
Row 2ING
Row 3ABC

Layer 2

RowColumn 1Column 2Column 3
Row 1EFH
Row 2JKL
Row 3MOQ

Layer 3

RowColumn 1Column 2Column 3
Row 1RST
Row 2VWX
Row 3YZ+
The working, step by step (5 rows)

Each code group as cell numbers in one line, cut into three rows and read downwards.

CodeCell numbersLayersRowsColumnsMessage
JWBAP221 322 132 131 111221322132131111LEAVE
WYPCA322 331 111 133 131322331111133131THETR
NFIFR122 212 121 212 311122212121212311IFLEI
BKPGS132 222 111 123 312132222111123312NTHEF
RIFPY311 121 212 111 331311121212111331RIDGE

How it works

This trifid cipher decoder turns each code letter into a three-digit cell, unshuffles the digits inside each group and reads the message back. Below are all 27 cells under four keys.

Read the full guide

How the key fills the cells

The key fills the cells from 111 to 333: its letters once each, then the unused alphabet, then a plus sign. PUDDING fills the first square with PUD, ING and ABC. In groups of 5, JWBAP WYPCA NFIFR BKPGS RIFPY reads leave the trifle in the fridge.

Right key, wrong words

Check the group size first. Decoded in sevens, the opening code begins MLUZHHP with the key correct. Open Try every group size and press Use on the row that reads. If the key holds a plus sign or #, match 27th character under More options. Wikipedia follows Delastelle with a plus sign. The American Cryptogram Association prints # and calls the group size the period.

Tips
  • One mistyped letter spoils at most three. Make the opening code's seventh letter U: LEAVE XHEDP IFLE IN THE FRIDGE.
  • Avoid group sizes of 3, 6 and 9: each code letter is all layers, all rows or all columns.
  • A last group of one letter is sent as itself. An empty Key box means the plain alphabet.

Questions and answers

Why does a trifid cipher have 27 cells?

Three digits of three values each make 27 combinations, one more than the alphabet. Two symbols would give 8 cells, four 64. Félix Delastelle described the cipher in 1902, extending his earlier bifid. Trifid means divided into three parts.

Can a trifid cipher decoder work without the key?

Not this one. It tries every group size, never every key: 27 characters have nearly 11 octillion orders. Try an empty key first, then any word in the clue. Counting letters says little, because each code letter depends on three letters of the message.

How do I decode a trifid cipher by hand?

Take one group. Write each code letter's three digits in a line, cut the line into three rows and read down the columns: each column is one letter's cell. The working, step by step shows it. A 1902 pencil cipher, never for passwords.

All 27 cells

Layer 1, the first square: cells 111 to 133 9

  • Cell 111 Layer 1, the top left corner. Holds A with no key, F under Wikipedia's key, E under EXTRAORDINARY and P under PUDDING. The first letter of any key lands here.
  • Cell 112 Layer 1, the middle of the top row. Holds B with no key, E under Wikipedia's key, X under EXTRAORDINARY and U under PUDDING.
  • Cell 113 Layer 1, the top right corner. Holds C with no key, L under Wikipedia's key, T under EXTRAORDINARY and D under PUDDING.
  • Cell 121 Layer 1, the middle of the left side. Holds D with no key, I under Wikipedia's key, R under EXTRAORDINARY and I under PUDDING.
  • Cell 122 Layer 1, the centre. Holds E with no key, X under Wikipedia's key, A under EXTRAORDINARY and N under PUDDING.
  • Cell 123 Layer 1, the middle of the right side. Holds F with no key, M under Wikipedia's key, O under EXTRAORDINARY and G under PUDDING.
  • Cell 131 Layer 1, the bottom left corner. Holds G with no key, A under Wikipedia's key, D under EXTRAORDINARY and A under PUDDING.
  • Cell 132 Layer 1, the middle of the bottom row. Holds H with no key, R under Wikipedia's key, I under EXTRAORDINARY and B under PUDDING.
  • Cell 133 Layer 1, the bottom right corner. Holds I with no key, D under Wikipedia's key, N under EXTRAORDINARY and C under PUDDING.
Show all 27 cells (18 more)

Layer 2, the second square: cells 211 to 233 9

  • Cell 211 Layer 2, the top left corner. Holds J with no key, S under Wikipedia's key, Y under EXTRAORDINARY and E under PUDDING.
  • Cell 212 Layer 2, the middle of the top row. Holds K with no key, T under Wikipedia's key, B under EXTRAORDINARY and F under PUDDING.
  • Cell 213 Layer 2, the top right corner. Holds L with no key, B under Wikipedia's key, C under EXTRAORDINARY and H under PUDDING.
  • Cell 221 Layer 2, the middle of the left side. Holds M with no key, C under Wikipedia's key, F under EXTRAORDINARY and J under PUDDING.
  • Cell 222 Layer 2, the centre. Holds N with no key, G under Wikipedia's key, G under EXTRAORDINARY and K under PUDDING. The middle of the middle square.
  • Cell 223 Layer 2, the middle of the right side. Holds O with no key, H under Wikipedia's key, H under EXTRAORDINARY and L under PUDDING.
  • Cell 231 Layer 2, the bottom left corner. Holds P with no key, J under Wikipedia's key, J under EXTRAORDINARY and M under PUDDING.
  • Cell 232 Layer 2, the middle of the bottom row. Holds Q with no key, K under Wikipedia's key, K under EXTRAORDINARY and O under PUDDING.
  • Cell 233 Layer 2, the bottom right corner. Holds R with no key, N under Wikipedia's key, L under EXTRAORDINARY and Q under PUDDING.

Layer 3, the third square: cells 311 to 333 9

  • Cell 311 Layer 3, the top left corner. Holds S with no key, O under Wikipedia's key, M under EXTRAORDINARY and R under PUDDING.
  • Cell 312 Layer 3, the middle of the top row. Holds T with no key, P under Wikipedia's key, P under EXTRAORDINARY and S under PUDDING.
  • Cell 313 Layer 3, the top right corner. Holds U with no key, Q under Wikipedia's key, Q under EXTRAORDINARY and T under PUDDING.
  • Cell 321 Layer 3, the middle of the left side. Holds V with no key, U under Wikipedia's key, S under EXTRAORDINARY and V under PUDDING.
  • Cell 322 Layer 3, the centre. Holds W with no key, V under Wikipedia's key, U under EXTRAORDINARY and W under PUDDING.
  • Cell 323 Layer 3, the middle of the right side. Holds X with no key, W under Wikipedia's key, V under EXTRAORDINARY and X under PUDDING.
  • Cell 331 Layer 3, the bottom left corner. Holds Y with no key, Y under Wikipedia's key, W under EXTRAORDINARY and Y under PUDDING.
  • Cell 332 Layer 3, the middle of the bottom row. Holds Z with no key, Z under Wikipedia's key, Z under EXTRAORDINARY and Z under PUDDING. The same letter under all four.
  • Cell 333 Layer 3, the bottom right corner. Holds the plus sign with no key, the plus sign under Wikipedia's key, the # sign under EXTRAORDINARY and the plus sign under PUDDING. The spare cell: 27 cells, 26 letters. Wikipedia follows Delastelle and fills it with a plus sign; the American Cryptogram Association uses #.

How this list was compiled: The 27 cells are the cipher's own table: three squares of nine, numbered by layer, row and column from 111 to 333. The numbering, the way a key fills the cells, the plus sign as the 27th character and the example under the key FELIX MARIE DELASTELLE (groups of 5, code FMJFV OISSU FTFPU FEQQC) come from Wikipedia's article Trifid cipher (https://en.wikipedia.org/wiki/Trifid_cipher), read on 2026-09-19. The # as 27th character, the period of 5 to 15 and the example under the key EXTRAORDINARY (period 10, code EYMXV UCRYY YYEAY VYOVV XITDP ATHE) come from the American Cryptogram Association's cipher guide (https://www.cryptogram.org/downloads/aca.info/ciphers/Trifid.pdf), read the same day. The build script reproduces both published codes, and all 27 of Wikipedia's letter and cell pairs, before it writes this list. Every other example was written for this site, encoded by the script, decoded again by a separate routine and checked to match. Licence: own work; the cipher's numbering and the two published examples named in the source line (Wikipedia's and the American Cryptogram Association's) are quoted with credit