nrtechstudio .com
M3 · Wehrmacht Army Enigma · Interactive

Enigma Machine Simulator

A historically accurate Enigma M3 simulator that runs entirely in your browser: pick any 3 of the 8 historical rotors, set rings and plugboard, then type — watch the rotors step (including the famous double-stepping anomaly) and trace each letter's path through the machine. Decrypt by re-entering the ciphertext with identical settings.

Educational tool — not secure encryption. The Enigma cipher was broken in the 1940s and is trivially breakable today. Never use it for real secrecy; use modern cryptography (e.g. AES-256) instead.

The Machine

Type on the keyboard below (or tap the keys) — rotors step before each letter is enciphered, exactly like the 1940s hardware.

Rotors — click ▲▼ to turn
Signal path — live trace
Press a key to trace the signal.
Lampboard
Keyboard
Input — plaintext or ciphertext
Output
Output appears here…
Privacy: this simulator runs 100% in your browser. Keystrokes, settings and messages never leave your device — there is no server, no analytics payload, no network request.

Daily Key Settings

Configure the machine exactly as a German signals unit would each morning — then type above.

Walzenlage · Rotor order

Any 3 of the 8 historical rotors, in any order — 336 combinations.

Ringstellung · Ring setting

Rotates each alphabet ring against its wiring core (26³ = 17,576).

Grundstellung · Start position

Window letters before the first keypress (26³ = 17,576).

Umkehrwalze · Reflector

Sends the signal back through the rotors — the reason Enigma is reciprocal.

Steckerbrett · Plugboard

Up to 10 pairs, e.g. AM FI NV. Each letter may appear once; a letter can never plug into itself.

Keyspace

The famous figure of ~159 quintillion possible settings comes from multiplying every choice above — yet Bletchley Park still broke it daily. See why it was broken.

How the Enigma machine works

If you arrived here asking how does Enigma machine work, here is the complete answer in plain language — and you can verify every claim by typing in the simulator above.

Pressing a key on an Enigma M3 sends an electric current on a round trip: from the keyboard through the plugboard (Steckerbrett), then through the three rotors right-to-left, into the reflector (Umkehrwalze), back through the rotors left-to-right, through the plugboard again, and finally to a lamp that lights the enciphered letter. Crucially, the rotors step before the current flows — so the wiring path is different for every single letter.

The rotors and their wiring

Each rotor is a disc with 26 electrical contacts on each face, wired internally in a scrambled, fixed pattern. Eight historical rotors existed (I–VIII); the machine held any three, in any order. The wiring of rotors I–VIII and reflectors UKW-B/UKW-C used in this simulator is the documented historical wiring (see methodology).

Stepping — and the double-stepping anomaly

The right rotor advances with every keypress. Each rotor carries a small turnover notch; when a rotor sits in its notch position as a key is pressed, the rotor to its left advances too. Notch letters: I→Q, II→E, III→V, IV→J, V→Z, and VI/VII/VIII→Z and M (two notches).

The famous double-stepping anomaly: when the middle rotor is in its notch position, it steps and drags the left rotor along — then on the very next keypress it steps again because it is still at its notch. Watch the notch lamps above the drums: type until the middle rotor reaches its notch and you will see it step twice in a row. This quirk was real, and cryptanalysts exploited it.

Ringstellung — the ring setting

The alphabet ring around each rotor can be rotated against the wiring core (A–Z). It changes which wiring contact sits behind each window letter, without moving the turnover notch (the notch is fixed to the ring). Ring settings multiply the keyspace by 26³ = 17,576 — but do not change the stepping rhythm.

Steckerbrett — the plugboard

Up to 10 cables swap pairs of letters before and after the rotors (e.g. A↔M). Ten pairs contribute the largest single chunk of the keyspace — about 150 trillion possibilities — yet added late (1930s) and set from daily key sheets, they were attacked procedurally rather than by brute force.

Umkehrwalze — the reflector

The reflector connects its 26 contacts in 13 pairs, sending the current back through the rotors by a different route. Two consequences define Enigma cryptanalysis: encryption is reciprocal (same settings decrypt), and no letter can ever encipher to itself.

History: from invention to Bletchley Park

Declassified history

The Enigma was patented by German engineer Arthur Scherbius in 1918 and first sold commercially in the 1920s. The German military adopted it from the late 1920s, adding the plugboard and expanding the rotor set — confident the machine was unbreakable.

It was first broken not by the British but by Poland: Marian Rejewski of the Polish Cipher Bureau reconstructed the rotor wiring by pure mathematics in 1932, exploiting the German procedure of repeating the message key. His bomba kryptologiczna read Enigma until German procedural changes in 1938–39.

When Poland shared everything with Britain and France in July 1939, the work moved to Bletchley Park. Alan Turing (with Gordon Welchman) designed the British Bombe — an electromechanical machine that tested rotor positions against a guessed plaintext fragment ("crib"). Daily breaks of Enigma traffic, codenamed Ultra, ran from 1940 and materially shortened the war. The full story stayed classified until the 1970s.

Why the Enigma was broken

A keyspace of ~159 quintillion settings sounds invincible. It fell anyway, for reasons this simulator lets you feel first-hand:

  • No letter enciphers to itself. Type AAAAA in the simulator — you will never see an A in the output. Bombes used this to rule out thousands of rotor positions per crib.
  • Procedural flaws. Operators repeated the 3-letter message key at the start of each message (until 1940), chose predictable keys ("cribs" like WETTER), and stereotyped message formats — giving cryptanalysts known plaintext to attack.
  • The plugboard was attacked, not brute-forced. The Bombe searched rotor positions while deducing plugboard pairs logically from contradictions, instead of trying 150 trillion combinations.
  • Human intelligence and captures. Key sheets, codebooks from captured U-boats (e.g. U-110, May 1941), and operator laziness ("Cillies" — keys like AAA or girlfriend's initials) did the rest.

The lesson cryptographers took from Enigma: a cipher is only as strong as its procedures and its mathematics together. Modern ciphers (AES-256) are designed so that even perfect procedures leak nothing — Enigma leaked a little with every letter.

Worked examples

Each example loads its exact settings into the simulator above so you can replay it.

Example 1 — the canonical test: AAAAA → BDZGO

Rotors
I · II · III (left to right)
Rings
A A A
Positions
A A A
Reflector
UKW-B, no plugboard
Input
AAAAA
Output
BDZGO

This is the standard published reference vector for Enigma M3. With rings at B B B instead of A A A, the same input gives EWTYX — try changing the ring settings and watch.

Example 2 — with plugboard: HELLO → MIJEN

Rotors
II · I · III
Rings / Positions
A A A / A A A
Reflector
UKW-B
Plugboard
AM FI NV PS TU WZ
Input
HELLO
Output
MIJEN

Now reset the rotors to AAA and type MIJEN — you get HELLO back. Same settings decrypt: Enigma is reciprocal.

Example 3 — double-stepping, live

Rotors
I · II · III, rings AAA, positions ADU, UKW-B
Experiment
Type any 4 letters and watch the drums
Windows
ADU → ADV → AEW → BFX → BFY

On the second keypress the right rotor (III) sits at its notch V, dragging the middle rotor along. On the third, the middle rotor (II) is at its own notch E — it steps again and carries the left rotor with it. That is the double-stepping anomaly, simulated faithfully.

Methodology & verification

Wiring source

Rotor wirings I–VIII, turnover notches (I:Q, II:E, III:V, IV:J, V:Z, VI–VIII:Z+M) and reflector wirings UKW-B/UKW-C are the published historical wirings documented on Wikipedia's "Enigma rotor details" (citing the Crypto Museum's Enigma wiring reference). These are public historical facts, not creative content. The full Enigma rotor wiring table is reproduced below for reference.

RotorWiring (A→…)Notch
IEKMFLGDQVZNTOWYHXUSPAIBRCJQ
IIAJDKSIRUXBLHWTMCQGZNPYFVOEE
IIIBDFHJLCPRTXVZNYEIWGAKMUSQOV
IVESOVPZJAYQUIRHXLNFTGKDCMWBJ
VVZBRGITYUPSDNHLXAWMJQOFECKZ
VIJPGVOUMFYQBENHZRDKASXLICTWZ, M
VIINZJHGRCXMYSWBOUFAIVLPEKQDTZ, M
VIIIFKQHTLXOCBJSPDZRAMEWNIUYGVZ, M
UKW-BYRUHQSLDPXNGOKMIEBFZCWVJAT—
UKW-CFVPJIAOYEDRZXWGCTKUQSBNMHL—

Turnover model

Stepping is purely mechanical: it depends only on window positions versus notch letters. The notch is fixed to the alphabet ring, so the ring setting changes the wiring alignment but never the turnover rhythm — verified by test V8 (identical stepping traces under ring settings AAA, QWE and ZMC). On each keypress: if the middle rotor is at its notch it steps and carries the left rotor; if the right rotor is at its notch the middle steps; the right rotor always steps. When both middle and right are at their notches, the middle steps twice (two pawl engagements in one stroke).

Test suite

14 reference vectors were written and frozen before the simulator code, computed by an independent Python implementation. They include the two published anchors (AAAAA→BDZGO at rings AAA, AAAAA→EWTYX at rings BBB), the documented double-stepping window sequence, a plugboard round-trip, both UKW reflectors, and two worked examples cross-checked against an independent open-source Enigma implementation (HELLO→MIJEN, DSFSDFSDF→SCLMEEYMV — both match). The engine test suite (54 tests: wiring permutations, reflector involutions, frozen vectors, stepping traces, plugboard validation, invalid-config rejection, input sanitization) passes 54/54. All test artefacts ship with this tool.

Frequently asked questions

What is this Enigma machine simulator?

It is a free online simulator of the German Enigma M3, the 3-rotor cipher machine used by the Wehrmacht in World War II. You choose 3 of the 8 historical rotors, set the rings, start positions, reflector and plugboard, then type — the simulator steps the rotors and enciphers each letter exactly as the 1940s hardware did. Everything runs in your browser; nothing is sent to any server.

How do I use the Enigma simulator to encrypt a message?

Pick your daily key: rotor order (e.g. I-II-III), ring settings, start positions, reflector (UKW-B) and up to 10 plugboard pairs. Then type your message in the input box or tap the on-screen keyboard — each letter is enciphered instantly and the drums rotate. Only the letters A–Z are enciphered; spaces and punctuation are skipped. Use the copy button to grab the grouped output.

Can I decrypt an Enigma message with the same settings?

Yes. Enigma encryption is reciprocal: the reflector sends the current back through the rotors, so enciphering is its own inverse. To decrypt, set the machine to the exact same daily key, reset the rotors to the original start position, and type the ciphertext — the original plaintext comes out. That reciprocal design is what makes this page a complete Enigma machine decoder as well as an encoder: there is no separate decode mode because the machine never needed one. Try it with worked example 2: HELLO becomes MIJEN, and MIJEN becomes HELLO again.

How historically accurate is this Enigma simulator?

The rotor wirings (I–VIII), turnover notches and both reflector wirings (UKW-B/UKW-C) are the published historical wirings documented on Wikipedia's Enigma rotor details page (citing the Crypto Museum). The stepping model — including the double-stepping anomaly and the fact that ring settings never change the turnover rhythm — was verified against documented stepping sequences. Fourteen reference vectors were frozen before coding, including the published anchors AAAAA→BDZGO and AAAAA→EWTYX, and two worked examples cross-checked against an independent open-source Enigma implementation (both match byte-for-byte). The engine test suite passes 54/54.

What do the rotor settings I–VIII mean?

Eight different rotors existed historically, each with its own fixed internal wiring and turnover notch. The M3 used any three at a time, in any order — 8×7×6 = 336 possible rotor orders (Walzenlage). Rotors I–V were the original Army set; VI–VIII were added in 1938–39 with two notches each. In the simulator, choose the left, middle and right rotors from the dropdowns; each must be different.

What is the ring setting (Ringstellung)?

The Ringstellung rotates each rotor's alphabet ring against its internal wiring core. It changes which wiring contact sits behind each window letter, multiplying the keyspace by 26³ = 17,576. Because the turnover notch is fixed to the ring itself, the ring setting never changes when the rotors step — only how letters scramble. Operators set it with tweezers before inserting the rotors.

What is the start position (Grundstellung)?

The Grundstellung is the set of window letters visible on the three drums before the first keypress — another 26³ = 17,576 possibilities. The receiver had to set the identical start position to decrypt. In this simulator, turn the drums with the arrow buttons or type letters into the start-position fields; the drums always show the live position as you type.

How does the plugboard (Steckerbrett) work?

The plugboard sits in front of the rotors: up to 10 cables swap pairs of letters (for example AM swaps A↔M) before the current enters the rotors and again after it returns. With 10 pairs there are about 150 trillion combinations — the largest single contributor to the keyspace. Rules: at most 10 pairs, each letter in at most one pair, and a letter can never plug into itself. The simulator validates your pairs as you type them.

What is the double-stepping anomaly?

A mechanical quirk of the real machine. Normally the right rotor steps every keypress and drags the middle rotor along only when it sits in its turnover notch. But when the middle rotor itself is in its notch position, it steps and carries the left rotor too — and on the very next keypress it steps again, because it is still at its notch. So the middle rotor occasionally advances twice in a row. Load worked example 3 and watch the drums: ADU → ADV → AEW → BFX → BFY.

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

Because the reflector connects its contacts in fixed pairs and the current travels through the same rotor wires on the way back, a letter can never come out as itself — A never enciphers to A. This was Enigma's fatal mathematical flaw: at Bletchley Park, the Bombe machine used it to eliminate thousands of rotor positions for every guessed plaintext fragment (crib). You can verify it here: type AAAAA and no A will ever appear in the output.

How was the Enigma code broken?

Poland broke it first: in 1932 Marian Rejewski of the Polish Cipher Bureau reconstructed the rotor wiring by mathematics, exploiting Germany's procedure of repeating the message key, and built the bomba kryptologiczna. After Poland shared everything with Britain in July 1939, Alan Turing and Gordon Welchman at Bletchley Park designed the British Bombe, which tested rotor positions against guessed plaintext. Combined with captured key sheets, operator mistakes and the no-self-encipherment flaw, Enigma traffic was read daily from 1940 under the codename Ultra.

Is Enigma encryption secure today?

No — not even slightly. Enigma was broken with 1940s electromechanics; a modern laptop can brute-force its entire practical keyspace and exploit its mathematical flaws in seconds. This simulator is an educational tool for learning cryptography history. Never use Enigma — or any classical cipher — for real secrecy; use modern, vetted cryptography such as AES-256.

What is the difference between Enigma and Caesar or Vigenère ciphers?

Caesar, ROT13, Atbash and Vigenère are classical pencil-and-paper substitution ciphers with a fixed or keyword-driven shift — you can explore and break all of them in our cipher-lab tool. Enigma is a completely different beast: an electromechanical rotor machine whose substitution changes with every keystroke across a keyspace of about 159 quintillion settings. That is why it gets its own dedicated simulator.

Why was the Enigma so hard to crack?

The raw numbers are intimidating: 336 rotor orders × 17,576 ring settings × 17,576 start positions × ~150 trillion plugboard combinations ≈ 159 quintillion possible daily keys — far beyond hand computation. What made it breakable was not the math but the flaws around it: no letter enciphering to itself, repeated message keys, predictable operator habits, stereotyped message formats, and captured key material. Cryptography's enduring lesson from Enigma: a cipher is only as strong as its procedures plus its mathematics together.

Free tool by NRTechStudio