🧱

Rail Fence Cipher Encrypt/Decrypt

Rail fence encrypt/decrypt with custom rails and pattern preview.

Input TextTotal 0 · Letters 0 · Non-letters 0
Output ResultTotal 0

Conversion Settings

Rails
Range 2-20, classic examples use 3
Output Case
Group Output
0 means no grouping

Rail Pattern Preview

Shows only letters used for calculation
Result will appear here

About This Tool

The rail fence cipher is a classic transposition cipher that writes text along a zigzag rail pattern and reads row by row to produce ciphertext. This tool offers encrypt/decrypt modes, rail count control, case rules, non-letter handling, grouping output, and a rail pattern preview for learning and verification. Everything runs locally in your browser for privacy.

Features

  • 🔁 Bidirectional: Toggle between encrypt and decrypt instantly
  • 🎚️ Rail Control: Adjust rails from 2-20 with real-time output
  • 🔤 Case Rules: Preserve, uppercase, or lowercase options
  • 🧩 Non-letter Handling: Keep or ignore spaces and punctuation
  • 🧵 Pattern Preview: Visualize the rail writing path
  • 🛡️ Local Processing: Everything runs in your browser for privacy