Skip to content

Autokey Cipher

Encrypt text with the autokey cipher.

Text
Key
Output

No result

About Autokey Cipher

Autokey Cipher encrypts text with the classical autokey variant of the Vigenere cipher, the one that fixes the old weakness of a short repeating key by letting the message itself extend the key. You give it a text and a key, and for each letter it applies a shift drawn from the key - but after every letter is encrypted, that plaintext letter is appended to the key stream, so the shift for the next letter depends on everything that came before.

The mechanics are deliberately old-school. Letters are shifted by zero to twenty-five positions within their own case, so uppercase stays uppercase and lowercase stays lowercase, and the result is a substitution that reads like gibberish while keeping the original shape of the words. Digits, spaces and punctuation are left untouched and do not participate at all - they neither advance the key nor become part of it, which preserves the layout of the message but also leaves its structure visible.

Two behaviours are worth knowing before you use it. The key is normalised first: it is lowercased and stripped of everything but the letters a to z, so a key that contains numbers or symbols quietly loses them, and a key with no letters at all - empty, or only punctuation - makes the tool return the input unchanged rather than encrypting anything. And this is a classical cipher, not a secure one: there is no padding, no authentication and no defence against frequency analysis, so it belongs in a puzzle or a teaching example, never in anything that must actually stay secret.

How to use Autokey Cipher

  1. 1 Type the text you want to encrypt into the Text field.
  2. 2 Enter a key made of letters in the Key field.
  3. 3 Run the tool to read the ciphertext, which keeps the case and the punctuation of the input.

Frequently asked questions

What makes it an autokey cipher rather than a plain Vigenere?

In a plain Vigenere cipher the key repeats. Here, after each letter is encrypted the original plaintext letter is appended to the key stream, so the key effectively grows with the message and the pattern never cycles the way a short repeating key does.

Why did nothing change when I entered a key?

The key is lowercased and reduced to letters only before use. A key with no letters - blank, or made of digits and punctuation - is sanitised down to nothing, and the tool then returns the input unchanged rather than encrypting it.

Why are spaces and numbers still readable in the result?

Only the Latin letters are transformed. Everything else - spaces, punctuation, digits - is copied through untouched and does not advance the key, which keeps the layout of the message intact but also reveals where the word boundaries are.

Is this safe for passwords or secrets?

No. It is a classical cipher with no padding and no authentication, and the self-keying stream means one wrong letter breaks decryption from that point on. Use it for teaching or puzzles, and a real encryption algorithm for anything sensitive.

Free, online, and private

Free to use

Autokey Cipher is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How Autokey Cipher behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Input two fields - a Text textarea starting at ATTACKATDAWN and a Key text field starting at QUEENLY
Algorithm a self-keying Vigenere variant - after each letter is encrypted, that plaintext letter is appended to the key stream, so each shift depends on everything encrypted so far
Case a letter keeps its case, and the shift is applied as a rotation of zero to twenty-five within that case
Key handling the key is lowercased and stripped of everything but the letters a-z before it is used
Non-letters digits, spaces and punctuation pass through untouched, and they neither advance the key nor join it
Check vector the text ATTACKATDAWN with the key QUEENLY yields the ciphertext QNXEPVYTWTWP, the published autokey example

Compiled from the implementation of this tool and checked against it by itoolnet.

What Autokey Cipher does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • An empty or non-alphabetic key is fail-closed silently. A key that is blank, or one made only of digits and punctuation, is sanitised down to nothing and the tool returns the input unchanged - there is no warning that nothing was encrypted, so an accidental bad key looks like a successful run.
  • Only the twenty-six Latin letters are transformed. Everything else - spaces, punctuation, digits - is left in place, which preserves the layout of the message but also leaks its structure; the key is likewise reduced to letters, so a memorable key with numbers in it quietly loses those numbers.
  • This is a classical cipher, not a secure one. There is no padding, no authentication and no defence against frequency analysis, and the self-keying stream means one wrong or missing letter breaks decryption from that point on - it belongs in a puzzle or a teaching example, never in anything that must actually stay secret.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to Autokey Cipher with the snippet below. It is free, runs entirely in your browser, and needs no signup.