Encrypt and decrypt text with the zigzag rail fence transposition cipher (2-10 rails). Rail Fence Cipher is a free online tool from the ToolsRift Text Encoding Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
Characters are written diagonally down and up across a number of 'rails' (rows) in a zigzag pattern, then read off row by row to produce the ciphertext. It's a transposition cipher — it rearranges letters rather than substituting them.
Any number from 2 to 10. More rails create a more scrambled result. Note that using 1 rail leaves the text unchanged (identity).
Yes — the tool reconstructs the zigzag pattern from the ciphertext length, so decoding an encoded message with the same rail count returns your exact original text, including spaces and punctuation.