All tools

Rail Fence Cipher

Encrypt or decrypt using the rail fence transposition cipher.

Result
HOREL OLLWD

The text zigzags down and up across the rails, then each row is read off in order. Spaces and punctuation are kept as part of the message.

About

An old-school transposition cipher. Letters are written zig-zag across a number of rails, then read off line by line. Easy to break by hand. Good for learning how transposition ciphers work.

How to use

  1. Pick the number of rails.
  2. Enter your text.
  3. Toggle encrypt or decrypt.

FAQ

Is this secure?+

Not at all. With 2-5 rails it can be brute-forced by hand in minutes. Use it for puzzles and education, not real secrets.

What's the key?+

Just the number of rails. With 3 rails, 'HELLOWORLD' becomes 'HOLELWRDLO'. Decryption needs the same rail count.