Cryptography & Ciphers
Rail Fence Cipher Encoder
Encode text with the rail fence zigzag cipher. Choose rails and offset while preserving spaces and punctuation.
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 Encoder does
A rail fence encoder rearranges text along a zigzag path across several rows. It reads the rows from top to bottom to produce ciphertext. Rails controls the row count; Offset controls where the path starts.
Output
What you receive
The result contains the rail rows joined together. Spaces, punctuation, and line breaks take positions in the pattern.
Use this tool
How to use Rail Fence Cipher Encoder
- Enter your text. Remove spaces first only if your puzzle requires that convention.
- Set Rails to a whole number from 2 to the input length. Set Offset to 0 unless you know another starting position.
- Copy the ciphertext and record both settings. Use the decoder with the same settings to check your result.
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.