The Black Chamber

The Rail Fence Cipher involves writing messages so that alternate letters are written on separate upper and lower lines. The sequence of letters on the upper line is then followed by the sequence on the lower line, to create the final encrypted message.The security of the cipher can be improved by choosing more than two lines to encrypt your message with. You can change the number of lines by inserting a number into the box labelled 'Number of Lines'.

To decipher a message encrypted using two lines, you will need to divide the message into two halves and write the second half below the first. You can then read the message column by column. When deciphering any ciphertext, it is crucial to know how many lines were used to encrypt the message.

You can see how the Rail Fence Cipher works by typing your message into the space labelled Plaintext. Click the 'Create Rail Fence' button, then click the 'Create Ciphertext' button to encrypt your message.

Number of Lines: << >>
Create Rail Fence
Create Ciphertext
Decipher Ciphertext
Clear Boxes
Print Ciphertext
Rail Fence Puzzle