Caesar Cipher Decoder

Rail fence cipher decoder

Decoded message

The zigzag: plain text runs down and up the rails, then each rail is read left to right

What is a rail fence cipher decoder

A rail fence cipher decoder puts scrambled letters back in order. To encode, the sender writes the message in a zigzag across a set number of lines, called rails, then reads each rail from left to right.

Rail fence is a transposition cipher. Every letter stays the same and only the order changes, which sets it apart from Caesar or Atbash, where the letters themselves change.

The number of rails is the key. Pick a rail count in the card to see how it reshapes the same message.

WE ARE DISCOVERED with different rail counts

How to decode a rail fence cipher by hand

  1. Count the letters in the coded text.
  2. Draw the zigzag for that many letters across the rails, using blank marks.
  3. Count how many marks sit on each rail.
  4. Cut the coded text into pieces of those lengths and write each piece along its rail.
  5. Read the zigzag from the first mark to the last.

The player decodes the tool's sample with 3 rails.

Rail fence cipher examples

All three use 3 rails. Tap Try to load one into the decoder above.

CodedPlain
WECRLTEERDSOEEFEAOCAIVDENWe are discovered, flee at once
DNETLEEDHESWLFTAADefend the east wall
MMNETETONEAOMeet me at noon