Enigma Machine Simulator

Simulate the 3-rotor Wehrmacht Enigma I with rotors I–V, ring settings, reflector and plugboard, and encode or decode messages as you type.

Machine settings
Left (slow) Middle Right (fast) Rotor Ring Position

Rotor window after the message: AAA

Puzzle & teaching toy. Enigma was broken in the 1940s and offers no real security today. Everything runs locally in your browser; no text is ever transmitted.

Rotor wiring and turnover notches
RotorWiring (A→Z)Turnover
I EKMFLGDQVZNTOWYHXUSPAIBRCJ Q
II AJDKSIRUXBLHWTMCQGZNPYFVOE E
III BDFHJLCPRTXVZNYEIWGAKMUSQO V
IV ESOVPZJAYQUIRHXLNFTGKDCMWB J
V VZBRGITYUPSDNHLXAWMJQOFECK Z
UKW-A EJMZALYXVBWFCRQUONTSPIKHGD
UKW-B YRUHQSLDPXNGOKMIEBFZCWVJAT
UKW-C FVPJIAOYEDRZXWGCTKUQSBNMHL

Entry wheel (ETW) is the identity mapping A→A, as on the Wehrmacht Enigma I. The turnover letter is the window letter that makes the rotor to its left step.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

This Enigma machine simulator reproduces the German Wehrmacht Enigma I: three rotors chosen from the historical set I–V, ring settings (Ringstellung), start positions (Grundstellung), a reflector (UKW-A, B or C) and the plugboard (Steckerbrett). Each key press first steps the rotors, then the signal runs through the plugboard, right → middle → left rotor, into the reflector, back through left → middle → right, and out through the plugboard again. Because the reflector is reciprocal, Enigma is self-inverse: run the ciphertext back through a machine with the same settings and you get the plaintext, which is why there is no separate encode/decode switch.

The stepping logic includes the famous double-stepping anomaly: when the middle rotor sits on its turnover letter it advances again on the next key press and drags the left rotor with it. Rings, notches and wirings match the published tables, so the simulator reproduces textbook results — with rotors I II III, reflector B, rings AAA and positions AAA, typing AAAAA gives BDZGO. Only letters A–Z are enciphered; spaces, digits and punctuation are dropped, just like on the real machine where operators wrote X for a full stop.

Enigma is a puzzle and teaching toy, not a cipher: it was broken by Polish and British cryptanalysts and gives no meaningful protection. Everything here is plain JavaScript running in your browser — nothing you type is uploaded, stored or logged.

Frequently asked questions

How does the Enigma machine work?

Every key press first steps the rotors, then the electrical signal runs through the plugboard, the right, middle and left rotor, into the reflector, back through the left, middle and right rotor, and out through the plugboard again. Because the reflector is reciprocal, Enigma is self-inverse: a machine set to the same rotors, ring settings, start positions, reflector and plugboard turns the ciphertext straight back into the plaintext, which is why there is no separate encode and decode button.

What is the difference between the ring setting and the start position?

The start position (Grundstellung) is the letter showing in each rotor window when you begin typing, and it changes as the rotors step. The ring setting (Ringstellung) rotates the alphabet ring relative to the internal wiring and never changes during a message, so it shifts the whole substitution without moving the turnover notch. Both must match on the sending and receiving machine or the message will not come out.

Is the Enigma cipher still secure?

No. Enigma is a puzzle and teaching toy only. It was broken by Polish and British cryptanalysts during the Second World War, and any modern computer can brute-force its settings in moments. Use it for escape rooms, puzzles and learning how rotor machines work, never to protect real data. For that you want modern authenticated encryption such as AES-GCM.

Report a bug