Tool guide
About this tool.
- Classic ciphers are hand-made substitution and transposition schemes from before computers. They are fun and useful for puzzles, teaching and obfuscation, but they offer no real security.
- Everything runs locally in your browser or editor. Only the letters A-Z are changed by Vigenère, Atbash and Affine; digits, punctuation, spaces and accented letters pass through as they are.
- Vigenère shifts each letter by the matching letter of a repeating key, so LEMON turns ATTACKATDAWN into LXFOPVEFRNHR. Atbash mirrors the alphabet (A becomes Z). Affine maps each letter x to a*x + b modulo 26, and a must be coprime with 26.
- Rail fence writes the text in a zigzag over several rails and reads it rail by rail. ROT47 rotates the 94 printable ASCII characters by 47, so applying it twice returns the original.
Pick a cipher, set its options and paste your text.
Vigenère needs a key of letters. Affine needs the numbers a and b, where a must be coprime with 26. Rail fence needs a number of rails from 2 to 100.
Choose Encode or Decode for the ciphers that are not their own inverse.
The summary shows the direction and the cipher name.
- Vigenère, key LEMON: ATTACKATDAWN → LXFOPVEFRNHR
- Atbash: Hello → Svool
- Affine a=5, b=8: AFFINE CIPHER → IHHWVC SWFRCP
- Rail fence, 3 rails: WEAREDISCOVEREDFLEEATONCE → WECRLTEERDSOEEFEAOCAIVDEN
- ROT47: Hello, World! → w6==@[ (@C=5P
- Input is limited to 1,000,000 characters.
- Classic ciphers are not secure encryption; never use them to protect real secrets.
- Letters outside A-Z, such as accented letters, are left unchanged by the letter ciphers.
- Vigenère advances the key only on letters, so spaces and punctuation do not consume it.