Enigma Machine Simulator

: Encrypt and decrypt like the WWII Enigma machine: Enigma I, M3 and the four-rotor M4, with rotors I–VIII, ring settings, start positions, plugboard and reflector, the double step and the path of each letter shown
Limits: .txt
Output
Left to right: letters or numbers 1 to 26.
Options
Up to 13 pairs; empty for no cables.
The lamps light here as you type.

An Enigma machine simulator that works like the real thing: choose the model (Enigma I, the navy M3 or the four-rotor M4), the rotors, reflector, ring settings, start positions and plugboard, then type. Each letter steps the rotors and lights a lamp, exactly as the WWII cipher machine did, so the same settings decrypt a message too. It decodes genuine wartime messages too.

  1. Pick the Model. Enigma I, used by the German army and air force, takes rotors I to V and reflector A, B or C; the navy's M3 adds rotors VI, VII and VIII; the M4 adds a thin fourth rotor (Beta or Gamma) beside a thin reflector.
  2. Choose the Left rotor, Middle rotor and Right rotor, each a different one, and the Reflector (UKW).
  3. Under Options, type the Ring settings and Start positions from left to right, as letters (B U L) or numbers (02 21 12). Add the Plugboard pairs, such as AV BS CG; leave it empty for no cables.
  4. Type or paste into Text. The output appears as you type, with the input and output letters lined up and the path of the first letter through every part of the machine. The Example menu holds a real 1941 message.
  5. To decrypt, enter the same settings and paste the cipher text, or press Decrypt back to turn the output into the input. Choose Remove, groups of five to write the output as operators sent it.

With the default settings (Enigma I, rotors I II III, UKW B, rings and start AAA, no plugboard), HELLOWORLD comes out as ILBDAAMTAZ. Typing ILBDAAMTAZ with the same settings gives HELLOWORLD back.

Input
HELLOWORLD
Output
ILBDAAMTAZ

How do I decode an Enigma message?

You need the settings it was sent with: model, rotors and their order, reflector, ring settings, start positions and plugboard pairs. Enter them, paste the cipher text, and the plain text appears. Without the settings it has to be broken by search, as Bletchley Park did with cribs and Bombes; this page does not brute-force settings.

Why does the same setting encrypt and decrypt?

The reflector makes the circuit symmetric: if A lights K at some rotor position, K lights A at that same position. So typing the cipher text with the same start settings lights the original letters.

Why can a letter never be encrypted as itself?

The current goes out and back through the reflector, which never connects a contact to itself, so the lamp is always a different letter. It was one of Enigma's main weaknesses.

What is the double step?

When the middle rotor reaches its notch it turns again on the next key press, together with the left rotor. So the middle rotor steps on two key presses in a row, which shortens the cycle from 26 × 26 × 26 = 17,576 to 16,900 positions.

Who broke the Enigma code?

Polish mathematicians Marian Rejewski, Jerzy Różycki and Henryk Zygalski broke it first, in 1932, and passed their work to Britain and France in 1939. At Bletchley Park, Alan Turing and Gordon Welchman designed the Bombe that found daily keys from cribs through the rest of the war.

Runs entirely in your browser. Nothing is uploaded.