Enigma Machine Simulator

Enigma Machine Simulator

Simulate the WWII electromechanical rotor cipher with real-time electrical signal flow, configurable rotors, plugboard, and step animation mode.

Updated May 2026

Model:
Reflector:
Rotor Assembly Active
LEFT
A
Ring
01
MID
A
Ring
01
RIGHT
A
Ring
01
Q
W
E
R
T
Y
U
I
O
P
A
S
D
F
G
H
J
K
L
Electrical Signal Flow
KEY → PLUG → R-III → REFLECT → R-III↩ → LAMP — press a key above to see the signal path
Steckerbrett (Plugboard)

Click two letters to connect them (10 pairs remaining)

Input Plaintext 0 chars
Encrypted Output
Tip: To decrypt, use identical settings and enter the ciphertext

How to Use the Enigma Machine

1. Choose a Model

Select M3 (standard 3-rotor) or M4 (4-rotor Naval). M4 auto-switches to thin reflectors.

2. Set Your Rotors

Pick which rotor goes in each slot (I–V), set the starting position (letter in the window), and optionally adjust the ring setting.

3. Configure the Reflector

Choose reflector B or C (B-Thin / C-Thin for M4). Both parties must use the same reflector to communicate.

4. Wire the Plugboard

Click two letters to connect them. Up to 10 pairs. Each pair swaps those letters before and after the rotor pass.

5. Type or Paste Text

Press the keyboard buttons one by one to see the lampboard light up, or paste a full message in the Input area. Non-letter characters pass through unchanged.

6. Decrypt

Use the exact same settings (model, rotors, positions, ring, plugboard) and enter the ciphertext. The Enigma is self-inverse — encryption and decryption are identical operations.

Enigma Machine Simulator — Real-Time Signal Flow, Rotors & Plugboard

The Enigma machine is the most famous cipher device in history — and this simulator reproduces its authentic electromechanical behavior in your browser. Set rotors, configure the plugboard, and watch the electrical signal travel from keypress to lamp in real time. No download, no account required.

Used by Nazi Germany during WWII to encrypt military communications, the Enigma machine had over 158 quintillion possible configurations. This simulator supports both Enigma M3 (Wehrmacht/Luftwaffe) and M4 (Kriegsmarine naval), with authentic rotor wiring, ring settings, double-stepping, and plugboard support up to 10 pairs.

How to Use the Enigma Machine Simulator

Encrypting a message replicates the exact procedure operators followed during WWII:

  1. Choose your model and reflector — select Enigma M3 or M4 at the top bar, then pick a reflector (B or C for M3; B-Thin or C-Thin for M4). These define the core encryption path.
  2. Configure your rotors — for each of the three positions (Left, Mid, Right), select the rotor type (I–V) and set the starting position (A–Z) using the up/down arrows. The letter display shows the current position. Adjust ring settings (01–26) below each rotor.
  3. Set up the plugboard — click two letters in the Steckerbrett panel to connect them as a pair. Up to 10 pairs are supported. Connected pairs are shown with colored labels — click any pair label's × to remove it.
  4. Type or paste your message — use the on-screen keyboard for interactive single-key encryption (watch the lampboard light up the encrypted letter and see the signal flow panel update), or paste text directly into the Input Plaintext textarea for bulk encryption.
  5. Read the output — the Encrypted Output panel shows the ciphertext. To decrypt, use identical machine settings (same rotors, positions, rings, plugboard) and enter the ciphertext — the output will be the original plaintext.

Enigma Machine Simulator — Examples

Plaintext Settings Ciphertext (first 5 chars)
HELLO M3, Rotors I-II-III, Pos A-A-A, Reflector B, no plugboard MFNCU
ATTACK M3, Rotors I-II-III, Pos A-A-A, Reflector B, no plugboard MHBZXJ
HELLO M3, Rotors I-II-III, Pos A-A-A, Reflector B, plugboard H↔X Changes per plugboard

Key property: Enigma is self-reciprocal — encrypt HELLO with given settings, take the output, enter it back with the same settings, and you get HELLO again. This made it a symmetric cipher requiring no separate decryption algorithm.

Edge case — no letter encrypts as itself: Press any key and watch the lampboard. The lit lamp will never be the same letter as the key you pressed. This is not a coincidence — it is a mathematical certainty of the reflector design, and it was the critical weakness Bletchley Park exploited.

How the Enigma Machine Works

The Enigma was an electromechanical cipher device used primarily by Nazi Germany during WWII. Invented by Arthur Scherbius in 1918 and adopted by the German military in 1926, it produced approximately 40,000 units before the war ended.

The 5 components (all visible in the simulator):

1. The Keyboard — 26 keys. Each keypress sends an electrical signal through the machine and illuminates a different letter on the lampboard. The machine can never encrypt a letter as itself.

2. The Plugboard (Steckerbrett) — Up to 10 letter pairs are swapped before the signal reaches the rotors and again on the way back. This contributed roughly 150 trillion configurations to the total.

3. The Rotors — Three (M3) or four (M4) rotating wheels, each containing a fixed substitution cipher. The right rotor advances on every keypress; others advance based on the notch mechanism. Rotor wiring used in this simulator:

  • Rotor I: notch at Q | Rotor II: notch at E | Rotor III: notch at V
  • Rotor IV: notch at J | Rotor V: notch at Z

4. The Reflector — At the far left, it connects letters in fixed pairs and sends the signal back through the rotors in reverse. This is why the Enigma is self-reciprocal.

5. Ring Settings (Ringstellung) — Each rotor's internal wiring can be offset by 1–26 positions, adding another layer of complexity.

The double-stepping anomaly: The middle rotor steps not only when the right rotor reaches its notch, but also when the middle rotor itself is at its own notch position — it "double-steps." This simulator implements this correctly.

Why 158 quintillion configurations:

Rotor selection (3 from 5): 60 combinations
Rotor starting positions:   26³ = 17,576
Ring settings:              26² = 676
Plugboard (10 pairs):       ~150,738,274,937,250

Total: ≈ 158,962,555,217,826,360,000

Alan Turing and Bletchley Park

Alan Turing (1912–1954) led the codebreaking effort at Bletchley Park that broke Enigma, fundamentally contributing to the Allied victory in WWII.

Polish mathematicians Marian Rejewski, Jerzy Różycki, and Henryk Zygalski first broke Enigma in 1932 using mathematical analysis, and shared their methods with Britain and France in 1939. Turing arrived at Bletchley Park and improved the Polish Bomba into the British Bombe — an electromechanical machine that tested possible Enigma configurations against known "cribs" (predicted plaintext phrases like "Keine besonderen Ereignisse" — "nothing to report").

The Bombe exploited two structural weaknesses: no letter encrypts as itself, and consistent German message phrases. By 1941, the Bombe was operational, allowing Britain to read German naval messages. The resulting intelligence, codenamed Ultra, provided critical advantage before D-Day.

Frequently Asked Questions

What is the Enigma machine and how did it work?

The Enigma was an electromechanical cipher device that encrypted each letter by routing an electrical signal through a plugboard, three or four rotating wheels (rotors), a reflector, and then back through the rotors in reverse. Each keypress advanced at least one rotor, meaning the substitution changed with every letter — making it a polyalphabetic cipher with billions of configurations. Its apparent complexity led Germany to believe it was unbreakable.

Why can't the Enigma machine ever encrypt a letter as itself?

The reflector connects letters in fixed pairs and forces the signal to travel through the rotors twice in opposite directions. This architecture makes it mathematically impossible for any letter to encrypt to itself — pressing A will never illuminate A. This was the critical structural flaw that Bletchley Park exploited: any machine position where a crib letter matched its ciphertext equivalent could be immediately eliminated, dramatically shrinking the search space.

What is the difference between Enigma M3 and M4?

Enigma M3 was the standard three-rotor variant used by the Wehrmacht and Luftwaffe. Enigma M4 was introduced in February 1942 for Kriegsmarine submarine (U-boat) communications. It added a fourth rotor (either Beta or Gamma, which does not rotate) and uses thinner B-Thin or C-Thin reflectors. This temporarily defeated the British Bombe machines until new analytical techniques were developed.

How do ring settings affect Enigma encryption?

Ring settings (Ringstellung) offset each rotor's internal wiring relative to its outer ring by 1–26 positions. Changing a ring setting shifts when the rotor's notch causes the next rotor to step, and also shifts all substitution positions within that rotor. Two machines with identical rotor types, positions, and plugboard but different ring settings will produce completely different ciphertext — ring settings were changed daily in the German key sheets.

Does this simulator produce historically accurate output?

Yes. The rotor wiring, notch positions, double-stepping mechanism, ring settings, plugboard logic, and reflector wiring all match the historical Enigma specifications used by the Wehrmacht, Luftwaffe, and Kriegsmarine. The output of this simulator is compatible with other accurate Enigma implementations — messages encrypted here can be decrypted by any correct Enigma emulator using the same settings.

What happens if I use the same message and settings twice?

Because Enigma is self-reciprocal, if you encrypt "HELLO" with given settings, you can take the ciphertext output and encrypt it again with identical settings to recover "HELLO." The encryption and decryption processes are identical — this was one of the design choices that made Enigma operationally convenient but also introduced subtle weaknesses.

Resources

Related Tools