Rail Fence Cipher
Rail fence cipher encryption and decryption, writes plaintext in zigzag and reads row by row.
Configuration
Encrypt
Decrypt
Instructions
Algorithm Principle
Rail fence cipher writes plaintext in a zigzag pattern across the specified number of rows, then reads row by row to produce ciphertext.
Steps
1. Enter the number of rails (rows, at least 2); 2. Enter plaintext, click 'Encrypt' to get ciphertext; 3. Enter ciphertext, click 'Decrypt' to restore plaintext.
Notes
Number of rails must be >= 2; rail fence cipher is a transposition cipher that only changes character order, not the characters themselves; low security, for educational demonstration only.
Related tools
More from the same category · Encryption
MD5 HashGenerate 32-char MD5 digests for text and files to verify integrity and detect content changes locally.Hash CalculatorMD5, SHA-1, SHA-256, SHA-512 digests for text and files in one pass for checksums.Base64 ConverterBase64 encode/decode for text, UTF-8 and images, with Data URL output for inline embedding.Symmetric EncryptionEncrypt/decrypt with AES, DES, 3DES, RC4 and SM4, configurable mode, padding, key and IV, fully client-side.RSA ToolsGenerate RSA key pairs (1024-4096 bit), encrypt/decrypt and sign with PKCS#1 v1.5 or PSS, browser-side.PGP ToolsGenerate OpenPGP keys, encrypt, decrypt and sign text or files with GnuPG-compatible ASCII-armored output.