Enigma Machine Simulator (Rotor Cipher)

Simulate the WWII German Enigma machine in your browser, with historically accurate rotor wiring and stepping mechanics. Configure rotor selection, ring settings, starting positions, and the plugboard to encrypt and decrypt messages. All processing happens entirely in your browser.

What Is This Enigma Machine Simulator

This tool is a simulator that reproduces the 3-rotor Enigma machine (Enigma I) used by the German military during World War II, right down to the same rotor wiring tables and stepping mechanism found in the original hardware. It takes your chosen combination of rotor types, ring settings, starting positions, and plugboard connections and applies them as the actual conversion rules, turning plaintext into ciphertext and ciphertext back into plaintext.

Everything runs entirely inside your browser, so the text you type is never sent to a server. Just like the real machine, only the letters A through Z pass through the rotors; numbers, punctuation, and spaces are left untouched and printed as-is. The simulator also faithfully preserves Enigma's "reciprocal cipher" property, meaning that running a ciphertext back through the exact same settings restores the original plaintext.

How to Use the Enigma Cipher Simulator

  1. Choose your rotors Pick a rotor (I through V) for each of the three slots — left, middle, and right. You can use the same rotor type in more than one slot.
  2. Match the ring settings Set the Ringstellung (A through Z) for each rotor. Encryption and decryption both require the exact same values.
  3. Set the starting position Specify the Grundstellung — the letter shown in each rotor's window. In real operation this was changed for every message.
  4. Configure the plugboard (optional) Enter up to 10 letter pairs you want to swap, separated by spaces, such as "AB CD".
  5. Enter your text and run it Type plaintext or ciphertext into the input box and press "Encrypt / decrypt" to see the converted result.

Tips for getting more out of it

  • Enigma is a reciprocal cipher, so running the ciphertext back through the exact same rotor settings, starting position, and plugboard reproduces the original plaintext. Try it with the "Send result back to input" button.
  • Changing the starting position (Grundstellung) by even a single letter produces a completely different ciphertext. In actual wartime use, this setting was typically changed every day.
  • Because the signal always passes through the reflector (Umkehrwalze), a letter can never be encrypted to itself. This quirk later became a crucial clue for Alan Turing and his fellow codebreakers.
  • The plugboard supports up to 10 letter pairs. The German military's own operating procedures also capped it at 10 pairs.
  • Clicking "Randomize settings" lets you experience, in a simplified form, the daily key-setting ritual (changing rotors, rings, and plugboard according to a key sheet) that real operators performed every day.

Ways to Use the Enigma Machine Simulator

As teaching material for cryptography and history classes

Letting students actually turn the rotors and watch the stepping mechanism in action makes the inner workings far more intuitive than a diagram in a textbook ever could.

Recreating the Bletchley Park codebreaking drama

Demonstrate how the same settings turn ciphertext back into plaintext, giving students a hands-on feel for the challenge Alan Turing and his fellow codebreakers faced.

Self-study of classical cipher algorithms

Change the rotors, ring settings, and plugboard one at a time and observe how the output shifts, building an intuitive, hands-on understanding of polyalphabetic substitution.

Checking Enigma examples from books and reference material

Enter the same rotor and key settings used in a cryptography book or website's worked example to reproduce and verify its input-output pairing for yourself.

Enigma Cipher Glossary

Rotor
A rotating cipher disk with its own unique internal wiring. Enigma combines three rotors (chosen from types I through V), and each keypress advances the rightmost rotor, with the others following according to the stepping mechanism.
Reflector (Umkehrwalze)
A component that sends the signal back through the three rotors a second time, in the reverse direction, after it first passes through them. This is what makes encryption and decryption the exact same operation.
Plugboard (Steckerbrett)
An extra encryption layer sitting between the keyboard and the rotors that swaps specified letter pairs. Up to 10 pairs can be configured, dramatically increasing the total number of possible key combinations.
Ring setting (Ringstellung)
A setting that shifts the relationship between a rotor's internal wiring and the alphabet printed on its outer ring. Separate from the starting position, it was typically kept fixed for a longer stretch of time as part of the key.
Starting position (Grundstellung)
The letter showing in each rotor's window at the moment encryption begins. In actual wartime use, this was changed for every individual message.
Stepping mechanism
The mechanism by which the right rotor advances one position with every keypress, and neighboring rotors turn in turn once a specific notch position is reached. It produces the well-known "double-stepping anomaly," in which both the left and middle rotors advance together whenever the middle rotor sits at its notch.
Reciprocal cipher
A property, arising from the reflector's design, in which running the same text through the machine twice with identical settings restores the original text. It's what lets Enigma use the exact same process for both encrypting and decrypting.

Frequently Asked Questions

Polish mathematicians first worked out the machine's internal structure mathematically in the 1930s. Britain's Bletchley Park later built on that work, and Alan Turing and his colleagues developed an electromechanical device called the "Bombe" to crack the daily-changing key settings. Operational habits, like reusing common opening phrases, also provided useful clues.

Not secure at all by modern standards. It was already systematically broken during World War II, and its key space is vastly smaller than that of modern ciphers like AES, meaning a present-day computer could brute-force it almost instantly. This tool is purely a historical and educational simulator.

No. Because the signal is always routed through the reflector, it is mathematically impossible for a letter to map to itself. This was actually a cryptographic weakness, and it became one of the key clues codebreakers used to guess at the plaintext.

The starting position is the letter shown in each rotor's window, changed for every individual message. The ring setting shifts the relationship between a rotor's internal wiring and its alphabet ring, and was a longer-lived part of the key. Both must match exactly for decryption to succeed.

It is an extra encryption layer that swaps specified letter pairs between the keyboard and the lamp display, before and after the signal passes through the rotors. It dramatically increases the number of possible combinations compared to the rotors alone, and was a major factor that made real-world German military traffic harder to break.
Tool-kun

Side Note — The Story of Enigma and Bletchley Park

Enigma was patented in 1918 by German engineer Arthur Scherbius as a commercial cipher machine, and later became widely known after the German military adopted it to protect its communications. It combined several rotating cipher disks called rotors; each keypress mechanically turned one or more rotors, changing the internal wiring so that even the same letter typed twice in a row would usually be encrypted differently.

The effort to break Enigma began with Polish mathematician Marian Rejewski and his colleagues, who worked out the machine's mathematical structure in the 1930s. After the outbreak of World War II, a codebreaking team assembled at Britain's Bletchley Park, where Alan Turing and others developed an electromechanical device called the "Bombe" to systematically determine the daily-changing key settings. This achievement is widely credited with contributing significantly to the Allied intelligence effort.

The history of breaking Enigma leaves a lasting lesson for modern cryptographic design: no matter how sophisticated a cipher mechanism is, operational habits and human error, such as always starting messages the same way or reusing key sheets, can become a way in. This simulator is purely an educational tool for learning about that history, and should never be used to protect real communications.