Trifid Cipher

3×3×3 cube
DEL
AST
BCF
GHI
JKM
NOP
QRU
VWX
YZ.
DABRVEDGLKDRKHVEDFPPGDCKHDGZ
Transformed locally in your browser. The keyword builds a 3×3×3 cube of 26 letters plus a . filler (I and J stay distinct), and the message is normalized to uppercase — spaces, digits, and most punctuation are dropped. Each letter splits into its layer, row, and column; within every block of period letters the layers are written first, then the rows, then the columns, and the digits are reread as new letter triples (a period of 0 or blank treats the whole message as one block). Output is always uppercase, so case and symbols are not preserved — round-trips recover the cleaned text but not its original formatting.

Fractionate letters across a keyed cube

The Trifid cipher splits each letter into three coordinates — layer, row, and column of a 3×3×3 cube — regroups those coordinates across a block of letters, and reads them back out as fresh triples. Spreading one letter's coordinates across its neighbours along three axes diffuses the message even more thoroughly than its two-dimensional Bifid sibling.

When to use this tool

Reach for the Trifid cipher when a puzzle, CTF challenge, escape room, or intro-cryptography lesson fractionates letters across a 3×3×3 cube. Devised by Félix Delastelle in 1902 as the three-dimensional successor to his Bifid cipher, it splits each letter into three coordinates — layer, row, and column — and regroups them within a block of `period` letters, so a single character's coordinates end up spread across its neighbours along three axes. That extra diffusion is what sets it apart from the Bifid cipher, the plain Polybius square, and the columnar transposition it draws on, completing the fractionating side of the classical family here.

Privacy and limitations

Everything runs locally in your browser; nothing is sent anywhere. This is a classical cipher, not real encryption — a known keyword and period make it trivial to reverse. It uses a 27-cell cube of the full alphabet A–Z plus a `.` filler, so unlike Bifid the letters I and J stay distinct; encoding is case-insensitive and drops every character except letters and `.` before fractionating. Because fractionation destroys positions, the output is uppercase only, and original case, spacing, and other punctuation are not recovered — a round-trip returns the cleaned, uppercased message rather than your exact input. A period of 0 or blank treats the whole message as one block; a negative or non-whole period is reported as invalid. Use the encode/decode toggle to switch directions, since the transform is not self-inverse.