Skip to content
100% local

Autokey cipher

Encrypt or decrypt text with a running key that extends itself from the message.

Input
Output

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.

FAQ

How is an autokey cipher different from a Vigenère cipher?
A Vigenère key repeats in a short, predictable cycle. An autokey's key keeps extending with fresh text — the message itself, or the ciphertext it produces — so it never repeats and is harder to break with frequency analysis.
What's the difference between the plaintext and ciphertext variants?
"Plaintext" continues the key with the message you are enciphering, the classic autokey scheme. "Ciphertext" continues it with the output instead — a related variant with its own known weaknesses. Both sides of a conversation need the same variant selected.
Why doesn't every character shift?
Only letters — and digits, in alphanumeric mode — carry the cipher. Anything else is either passed through untouched or dropped entirely, depending on the "Preserve case and punctuation" option.
What does the generated key stream show me?
It lists the exact alphabet symbol that shifted each character in order: your password, followed by its extension. It is mainly useful for checking arithmetic by hand or understanding how the running key is built.
Is my password or text uploaded anywhere?
No. The autokey cipher runs entirely in your browser — your password and text never leave your device.