Rail Fence (Zigzag) Transposition Cipher
Zigzag transposition across configurable rails.
About this tool
The rail fence writes plaintext in a zigzag across N rails, then reads the rails row by row. Unlike substitution ciphers it permutes letter positions rather than replacing letters — frequency analysis sees perfectly normal English, but anagramming attacks apply instead.
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Frequently asked questions about Rail Fence Cipher
How does the rail fence cipher work?+
Plaintext is written in a zigzag across a number of 'rails' (rows), then read off row by row. It rearranges letter positions rather than substituting letters.
Is it a substitution cipher?+
No — it's a transposition cipher. The letters are unchanged, only reordered, so frequency analysis sees normal text but anagram-style attacks apply.
How do I decrypt it?+
Enter the same number of rails used to encrypt; the tool reconstructs the zigzag and reads the original order.
Related tools
Caesar Cipher
Shift cipher with instant all-25 bruteforce
VIGENÈRE · POLYVigenère Cipher
The polyalphabetic cipher that resisted breaking for 300 years
ATBASH · AFFINEAtbash & Affine
Mirror-alphabet and modular substitution ciphers
BACON · 5-BITBaconian Cipher
Francis Bacon's five-bit steganographic alphabet