Cryptography & Ciphers
Rail Fence Cipher Decoder
Decode a rail fence cipher with a known rail count and offset. Restore zigzag text in your browser.
Tool workspace
Needs inputYour input stays in this browser.
Add the required input to continue.
Your result appears here
Complete the required input to continue.
Direct answer
What Rail Fence Cipher Decoder does
A rail fence decoder reverses a zigzag transposition. Enter the ciphertext and match the original rail count and offset. The tool fills each rail, then reads the zigzag path to recover the text.
Output
What you receive
The result contains the reconstructed text for your settings. Readable output does not prove that the settings are correct.
Use this tool
How to use Rail Fence Cipher Decoder
- Paste the ciphertext exactly as the encoder produced it.
- Set Rails to a whole number from 2 to the input length. Set Offset to 0 unless you know another starting position.
- Review the decoded text. If it looks wrong, check rails, offset, and whitespace before changing the message.
Processing
Browser processing
This tool processes its input in your browser. Your files and text stay on your device.
Limits
Check before you use the result
- This tool uses the settings you supply. It does not automatically discover the key or identify an unknown cipher.
- Spaces, punctuation, case, and line breaks stay in the input. Extra grouping spaces change the decoding pattern.
- The current engine works with UTF-16 units. Emoji can split in encoded text; use basic text for interoperable puzzles.
- Rail fence is a puzzle cipher. It does not protect secrets.