Autokey cipher
Encrypt or decrypt text with a running key that extends itself from the message.
Autokey cipher
The autokey cipher shifts each letter of your text with a running key that starts with a password and then keeps going by borrowing from the message itself. That's the key difference from a Vigenère cipher, whose short key repeats in a predictable cycle: an autokey's key never repeats, so it resists frequency analysis far better than a repeating-key cipher. Paste plaintext to encrypt it, or paste ciphertext with the same password to decrypt it — one input box handles both directions.
Type a password to seed the key, then choose how it extends past that seed. The classic "plaintext" variant keeps borrowing from the message being enciphered; "ciphertext" borrows from the output it just produced instead, a related scheme with different weaknesses. Switch the alphabet to letters and digits if you want numbers to shift along with the text, and turn on "Preserve case and punctuation" to keep spacing and capitalization exactly as typed, or off for a compact, uppercase-only block. "Show generated key stream" prints the symbol that shifted each character, handy for checking hand calculations or teaching how a running key is built.
Only Latin letters — and digits, in alphanumeric mode — advance the key and get shifted. Everything else passes through untouched, or is dropped along with the rest of the formatting when that option is off. Windows and Unix line endings are treated the same way, and the live tally reports how many characters were shifted, how long the effective password is, and whether the result was encrypted or decrypted.
Everything runs locally in your browser. Your password and text are never uploaded or sent anywhere — worth remembering for a cipher whose whole purpose is keeping something private. Copy the result, download it as a .txt file, or send the output straight back into the input to chain another transformation on top.