Classical Ciphers
Atbash, Affine, A1Z26, Polybius, Rail Fence, and Beaufort cipher - encode and decode instantly.
Examples
About Atbash
Atbash is a monoalphabetic substitution cipher that maps each letter to its mirror: A↔Z, B↔Y, C↔X, … It is its own inverse (reciprocal), so encoding and decoding are the same operation. Originally used for the Hebrew alphabet.
About Affine cipher
The Affine cipher maps each letter x to (a·x + b) mod 26. The key is the pair (a, b). For decryption: D(y) = a⁻¹·(y − b) mod 26. Only values of a coprime to 26 are valid (1,3,5,7,9,11,15,17,19,21,23,25).
Examples
About A1Z26
A1Z26 substitutes each letter with its ordinal: A=1, B=2, …, Z=26. Numbers are separated by hyphens. Spaces between words are preserved as "/" in output.
About Rail Fence
Rail Fence is a transposition cipher. The plaintext is written in a zigzag pattern across n rails, then read off row by row. For example, "HELLO WORLD" on 3 rails:H . . . O . . . L .
. E . L . W . R . D
. . L . . . O . . .
Read off: "HOOL ELWRDLO"
About Beaufort cipher
The Beaufort cipher is similar to Vigenère but uses the formula C = (K − P) mod 26, where K is the key letter index and P is the plaintext letter index. It is reciprocal (the same operation encrypts and decrypts). It was used in rotor machines and is related to the Variant Beaufort / Vigenère family.