The Magic Codex

Enigma Machine

The WWII cipher, faithfully rebuilt: rotors I–V, reflectors B/C, ring settings, and the plugboard. Set the daily key, type, and watch history encrypt.

Daily key

Type letter pairs separated by spaces. Each letter may appear once.

How to use the Enigma Machine

Operating the Enigma is a two-key ritual: the sender and receiver agree on a daily key, both set their machines identically, and then encryption and decryption are the same act.

  1. Set the daily key: pick three rotors (left to right), the reflector, ring settings, start positions, and plugboard pairs — or tap a preset daily key.
  2. Type your message. The output enciphers live. Spaces and punctuation pass through so your message stays readable.
  3. To decrypt: reset the positions to the original start letters (the Reset positions button does this), paste the ciphertext, and read the plaintext.
  4. Watch the electricity: open the step-by-step signal path to trace one letter through the plugboard, all three rotors, the reflector, and back.

Send a secret to a friend

Agree on a key — say rotors II IV V, rings BFR, starts QWE, plugs AM FI NV PS TU WZ, reflector B (that's preset Daily Key II). Both set it, you encrypt, they decrypt. Anyone without the exact key gets gibberish.

A tiny history

The Enigma began as a commercial machine in the 1920s; the German military adopted and hardened it with the plugboard. Polish mathematicians — Marian Rejewski first — broke it in 1932, and Bletchley Park's Bombes industrialized the break during WWII. The machine's one hard rule — a letter never encrypts to itself — was among the flaws that doomed it.

How does the Enigma machine encrypt a letter?
Each keypress first steps the rotors, then sends an electrical signal through the plugboard, through the three rotors right-to-left, into the reflector (which bounces it back), through the rotors left-to-right, and back through the plugboard to light a lamp. Because the rotors move every time, the same letter encrypts differently with each press.
Why is decrypting the same as encrypting on Enigma?
The reflector makes the machine reciprocal: if A encrypts to B at a given rotor position, B encrypts to A at that same position. So you set the identical daily key — rotors, rings, positions, plugboard — type the ciphertext, and the plaintext comes out.
What are ring settings (Ringstellung)?
Each rotor's internal wiring can be rotated relative to its alphabet ring. The ring setting changes where the wiring sits, which shifts the turnover point and the substitution — it's part of the daily key, separate from the visible start positions.
What is the plugboard (Steckerbrett)?
A panel of letter pairs connected by cables — up to 10 pairs. Each pair swaps two letters before and after the rotors. It was the Enigma's biggest strength: 10 pairs multiply the key space enormously, which is why this simulator lets you set them freely.
Is this simulation historically accurate?
Yes — it uses the real published wirings and turnover notches of rotors I–V, the real reflector B and C wirings, authentic stepping including the double-stepping anomaly, and proper ring-setting math. The famous test vector holds: rotors I II III, rings AAA, positions AAA, no plugs, reflector B turns AAAAA into BDZGO.
Can I use the Enigma for real secrets?
No. The Enigma was broken at Bletchley Park in the 1940s, and a modern computer cracks it instantly. This simulator is for learning history and having fun with friends — never for anything that must stay secret.
Is my message sent anywhere?
No. The entire simulation runs in your browser with JavaScript. Nothing is uploaded, stored, or tracked.

Need help with this tool?

Found a bug, or have a suggestion for the codex? Write to us — a real human reads every message.

[email protected]

More from the codex