Encrypt and decrypt with the affine cipher using multiplier and shift keys (a coprime to 26). Affine Cipher is a free online tool from the ToolsRift Text Encoding Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
Each letter's position x (0–25) is transformed with the formula E(x) = (a·x + b) mod 26. Decryption uses the modular inverse of a: D(y) = a⁻¹·(y − b) mod 26.
Only values of a that share no common factor with 26 (1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25) have a modular inverse, which is required to decrypt the message uniquely.
Only A–Z letters are transformed. Spaces, digits, and punctuation pass through unchanged, preserving the layout of your text.