Type your text and set a multiplier (coprime to 26) and a shift key, and the tool encrypts it using the affine cipher formula.
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.