Loading cipher tool...
Please wait a moment

How to Use the Keyword Cipher Tool

Create a substitution alphabet from a keyword while preserving the same structure and styling across the cipher pages.

Quick Overview

A keyword cipher is a monoalphabetic cipher. The keyword is deduplicated first, then the remaining alphabet is appended to create the full substitution map.

Because the mapping stays fixed for the whole message, this page is easier to reason about than Vigenere while still being more flexible than Caesar. It is a useful middle ground for substitution-cipher examples and puzzle-style text transforms, and it still belongs to the broader family of substitution ciphers.

Keyword

Duplicate letters are removed before building the alphabet.

Alphabet

Remaining unused letters are appended after the keyword.

Behavior

This tool preserves punctuation and original letter casing.

Step 1

Choose a Keyword

The keyword defines the front of the substitution alphabet. This page defaults to CIPHER, which creates a custom mapping before the remaining letters are filled in.

Keyword: CIPHER
Deduplicated prefix: CIPHER
Then append: the remaining unused letters in normal order.
Step 2

Build the Substitution Alphabet

The key idea is that the keyword only changes the alphabet once. After the custom alphabet is built, every matching plaintext letter maps to the same ciphertext letter for the rest of the message. That predictability is why the page is good for studying classical cipher behavior.

Standard: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Keyword map: CIPHERABDFGJKLMNOQSTUVWXYZ
Step 3

Review the Example

Example Input

Attack at dawn

Example Output with Keyword CIPHER

Cttcpg ct hcwl

This sample is intentionally readable enough to show that casing and spaces are preserved. That makes the tool useful for quick demonstrations without the stricter normalization required by Playfair or Hill.

Step 4

Decode with the Same Keyword

To decode, keep the same keyword and switch modes. If you want a more complex keyword-driven page next, continue to Playfair Cipher or Vigenere Cipher.

Frequently Asked Questions

What happens to duplicate letters in the keyword?

They are removed so each alphabet character only appears once in the substitution map.

Does this keep punctuation and case?

Yes. This page transforms letters while preserving punctuation and original casing.

How is this different from Vigenere?

Keyword cipher creates one fixed substitution alphabet, while Vigenere keeps changing the shift across the message.

Is this resistant to frequency analysis?

No. Because the alphabet mapping stays fixed, keyword substitution still leaks the same frequency patterns that make frequency analysis effective against classical monoalphabetic ciphers.