Rail Fence Cipher (Zigzag Encoder)
Security ToolsWrite text in a zigzag over rails and read it row by row
Similar tools you may like
History
All history →Rail Fence Cipher (Zigzag Encoder) — at a glance
Scramble a message in a zigzag pattern, or unscramble one.
How to use it — step by step
Text to encode or decode, and the number of rails (rows).
Add your text
Paste or type your input into the box. The Sample button fills in an example.
Choose the options
Pick the mode and settings you need. Results update when you run the tool again.
Press Run
The result is made instantly inside your browser.
Copy the result
Use the Copy button, or send it to another tool.
Pro tips
Small things that make the result better.
Quick facts
Frequently Asked Questions
What is a rail fence cipher?+
The text is written diagonally over a number of rows and then read row by row. Only the order of letters changes.
Can I decode without the rail count?+
Try 2, 3, 4 and so on until the text makes sense.
Is my data safe?+
Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.
Is this tool really free?+
Yes — completely free, no signup, no watermark and no usage limit.

