UTILS.
100% in-browser
🗝️

Keyword (Monoalphabetic Substitution) Cipher

Build a substitution alphabet from a keyword and encode or decode text through it, with the full plain-to-cipher mapping table displayed.


    
output

About this tool

The Keyword Cipher is the classic way to generate a monoalphabetic substitution alphabet from a memorable keyword. This tool builds that cipher alphabet, shows the full mapping, and uses it to encrypt or decrypt your text in the browser. It is distinct from Caesar (a fixed shift), Atbash (a fixed reversal), and Affine (a linear formula): here the entire substitution alphabet is derived from a word you choose.

The cipher alphabet is constructed by writing the keyword with duplicate letters removed, then appending the remaining unused letters of A–Z in order. An optional fill-start letter lets you begin that remaining sequence at a chosen point (wrapping around the alphabet) for extra variation. The resulting 26-letter string lines up positionally with the plain alphabet A–Z, so the letter at each index becomes its substitute. Encoding maps plain to cipher; decoding inverts the same table.

All processing happens locally, so nothing you type leaves your device. Case is preserved and any non-letter characters pass through untouched, which keeps punctuation and spacing intact. Because it is a simple substitution, the cipher preserves letter-frequency patterns and is vulnerable to frequency analysis — great for puzzles and learning, but not for real secrets. For example, the keyword KRYPTOS produces the cipher alphabet KRYPTOSABCDEFGHIJLMNQUVWXZ.

Frequently asked questions

How is the cipher alphabet generated?
Write the keyword, dropping any repeated letters, then append the letters of A–Z that have not yet appeared, in order. That 26-letter string is aligned with the plain alphabet position by position to form the substitution key.
What does the fill-start letter do?
It sets where the leftover (non-keyword) letters begin. Instead of always continuing from A, the fill can start at a chosen letter and wrap around the alphabet, producing a different mapping while still using every letter exactly once.
How is this different from a Caesar cipher?
A Caesar cipher shifts every letter by the same fixed amount, so the cipher alphabet is just a rotation. A keyword cipher scrambles the alphabet based on a word, giving a far larger key space, though both remain monoalphabetic substitutions.
Is the keyword cipher secure?
No. As a monoalphabetic substitution it leaves letter-frequency and word-pattern clues intact, so it is readily broken by frequency analysis on enough text. It is ideal for puzzles, classrooms, and CTFs, not for protecting sensitive data.

More tools