FreeDev Tools

Rail Fence Cipher

Encrypt and decrypt the zigzag rail fence transposition cipher with 2-10 rails.

Runs locally in your browser. Your input is not uploaded.

How to Use

  1. 1

    Enter your message

    Spaces are stripped by default, like classical practice.

  2. 2

    Set rails and mode

    2-10 rails; both parties must match.

  3. 3

    Copy the result

    Decrypt reverses the zigzag with the same rail count.

Frequently Asked Questions

Letters are written in a zigzag across N imaginary rails, then read off rail by rail. WE ARE DISCOVERED with 3 rails becomes WECRLTEERDSOEEFEAOCAIVDEN.