Keyword Cipher Encoder Decoder Online
Encrypt or decrypt text using a substitution alphabet built from a keyword.
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.
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.
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.
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.
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.
Related Tools
ROT13 Encoder / Decoder
Encode and decode text using ROT13 cipher. Rotate letters by 13 positions for simple obfuscation
Caesar Cipher
Encrypt and decrypt text with a configurable Caesar shift from 1 to 25
Atbash Cipher
Encode and decode text using the Atbash mirror alphabet substitution cipher
Vigenere Cipher
Encrypt and decrypt alphabetic text with a keyword-based Vigenere cipher
Morse Code Encoder / Decoder
Convert plain text to Morse code and decode Morse sequences back to readable text
Rail Fence Cipher
Encrypt and decrypt text using the zig-zag rail fence transposition pattern