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
- Count the letters in the coded text.
- Draw the zigzag for that many letters across the rails, using blank marks.
- Count how many marks sit on each rail.
- Cut the coded text into pieces of those lengths and write each piece along its rail.
- 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.
| Coded | Plain | |
|---|---|---|
| WECRLTEERDSOEEFEAOCAIVDEN | We are discovered, flee at once | |
| DNETLEEDHESWLFTAA | Defend the east wall | |
| MMNETETONEAO | Meet me at noon |