Enter the number of rails and the offset, if any. Choose the method, either encrypt or decrypt, and enter the text. Optionally add a check to show the rail fence.
Rail Fence Cipher (also called a zigzag cipher) generally refers to a form of transposition cipher. In the rail fence cipher, the plaintext is written downwards and diagonally on successive "rails" of an imaginary fence, then moving up when we reach the bottom rail. When we reach the top rail, the message is written downwards again until the whole plaintext is written out. The message is then read off in rows.
The rail fence cipher is not very strong; the number of practical keys is small enough that a cryptanalyst can try them all by hand.