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 shownOptions
Enigma Machine Simulator
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.
How to use the Enigma machine simulator
- 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. - Choose the
Left rotor,Middle rotorandRight rotor, each a different one, and theReflector (UKW). - Under
Options, type theRing settingsandStart positionsfrom left to right, as letters (B U L) or numbers (02 21 12). Add thePlugboard pairs, such asAV BS CG; leave it empty for no cables. - 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. - To decrypt, enter the same settings and paste the cipher text, or press
Decrypt backto turn the output into the input. ChooseRemove, groups of fiveto write the output as operators sent it.
Example
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.
HELLOWORLDILBDAAMTAZDetails
- How does the Enigma machine work? Pressing a key closes a circuit. The current goes through the plugboard, which swaps pairs of letters, then through three rotors from right to left; each rotor is a disc whose 26 contacts on one side are wired to a scrambled order on the other. The reflector (Umkehrwalze, UKW) sends the current back through the rotors by a different route and through the plugboard again, and a lamp lights the cipher letter.
- Before the current flows, the right rotor turns one step, so the next letter meets different wiring: pressing A five times from AAA gives BDZGO. When the right rotor passes its notch (Q on rotor I, E on II, V on III, J on IV, Z on V, both Z and M on VI to VIII) it turns the middle rotor, and the middle rotor turns the left one. The middle rotor also steps a second time with the left one, the famous double step: from ADU the windows read ADV, AEW, then BFX.
- The ring setting (Ringstellung) turns a rotor's wiring against its letter ring, so the same window letter means a different wiring position; with rings BBB, AAAAA gives EWTYX instead of BDZGO. The start positions (Grundstellung) are the letters shown in the windows before the first key press. Rotors, rings and plugboard were the secret daily key, printed on monthly key sheets.
- Because the reflector sends the signal back along a different path, Enigma is its own inverse: the same settings that encrypt also decrypt. The same design means no letter can ever become itself, a weakness the codebreakers at Bletchley Park used with Alan Turing's Bombe: a guessed word (a crib) could not sit where any of its letters matched the cipher text.
- The Example menu holds a real 1941 German army message from the invasion of the Soviet Union (Operation Barbarossa) (rotors II IV V, rings BUL, start BLA, ten plugboard cables). It decrypts to AUFKLXABTEILUNGXVONXKURTINOWAXKURTINOWAX…, German written with X for spaces: "Aufkl. Abteilung von Kurtinowa…", a reconnaissance unit reporting. Messages were often written that way, with numbers spelt out.
- The M4, used by U-boats from February 1942, fits a thin fourth rotor (Beta or Gamma) that never steps beside a thin reflector. With Beta at A and the thin B reflector it works exactly like the three-rotor machine with UKW B, which let it talk to M3 stations: here HELLOWORLD gives ILBDAAMTAZ on both.
Limits
- Letters A to Z only, as on the real keyboard. Spaces, digits and punctuation pass through (or are removed) and do not step the rotors; accented letters are not enciphered, so write Ä as AE.
- The wartime message procedure is not automated: operators first enciphered a message key (the indicator) at the day's start position, then set the rotors to that key for the message. To follow it, encrypt the indicator, then type its letters as the start positions.
- Models here: Enigma I, M3 and M4. Commercial, railway, Abwehr (G) and Swiss machines had other wirings and stepping, and are not included; neither is the rewirable reflector D.
- Enigma is a historical cipher and is broken. Use it for puzzles, teaching and history, not to protect real data.
FAQ
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.