Three-rotor historical cipher

Enigma machine simulator

Simulate a Wehrmacht Enigma M3 with authentic rotor wiring, pre-keypress stepping, ring settings, reflectors, and plugboard pairs.

01 / Machine

Set the machine

M3 / A-Z

Choose three different rotors in left-to-right order. Left is slow, middle double-steps, and right is fast.

Left rotor
Middle rotor
Right rotor

Wide UKW-B or UKW-C.

0 / 10 pairs

Optional. Enter up to 10 two-letter ASCII pairs separated by spaces. A letter can appear only once.

02 / Message

Transform a message

Same action deciphers
0 / 10,000 code points

ASCII letters A-Z and a-z are transformed and returned uppercase. Every other code point is preserved exactly and does not step the rotors.

Keyboard: press Ctrl+Enter or Command+Enter anywhere in the tool to transform.

Ready to transform.

03 / Result

Result

No result yet

Copy returns this exact text without the rotor-window label.

Final windows

---

Left, middle, right after all ASCII letters have stepped.

04 / Exact model

How this simulation works

  1. Step before the signal. The right rotor always advances before each ASCII letter. A right rotor at its notch advances the middle rotor. A middle rotor at its notch advances itself and the left rotor, creating the historical double-step.
  2. Route the signal. Each letter passes through the plugboard, then the right, middle, and left rotors, the reflector, and back through the left, middle, and right rotors in reverse before a final plugboard swap.
  3. Apply ring settings. Each ring offsets its rotor wiring from the displayed window. The notch is on the lettered ring, so turnover is tested at the visible window letter listed below.
  4. Use one reciprocal operation. Enigma has no separate decrypt mode. Transforming the result from the same starting settings recovers the uppercase ASCII plaintext while preserved nonletters remain in place.

Known-answer checks

Setup
I-II-III / B / rings AAA / start AAA / no plugs
AAAAA
BDZGO
HELLOWORLD
ILBDAAMTAZ

Double-step check

With I-II-III, rings AAA, and start ADU, the windows after three successive letter keypresses are:

  1. ADV
  2. AEW
  3. BFX

Historical wiring used

Rotor substitutions at ring A and window A
RotorA through Z maps toNotch
IEKMFLGDQVZNTOWYHXUSPAIBRCJQ
IIAJDKSIRUXBLHWTMCQGZNPYFVOEE
IIIBDFHJLCPRTXVZNYEIWGAKMUSQOV
IVESOVPZJAYQUIRHXLNFTGKDCMWBJ
VVZBRGITYUPSDNHLXAWMJQOFECKZ

A notch shown in the window causes the rotor to its left to advance on the next keypress. Reflector B uses YRUHQSLDPXNGOKMIEBFZCWVJAT; reflector C uses FVPJIAOYEDRZXWGCTKUQSBNMHL.

Limits, privacy, and security

  • Message input is limited to 10,000 Unicode code points. Plugboard input is limited to 80 UTF-16 code units and 10 valid pairs.
  • Non-ASCII text, emoji, combining marks, punctuation, spaces, tabs, and line feeds are preserved without stepping. Browser text controls normalize CR and CRLF line endings to LF.
  • All processing stays in this page. The tool makes no network requests, stores no input, and accesses the clipboard only after you choose Copy result.
  • Enigma is a historical cipher for education and puzzles. It is broken and unsuitable for passwords, personal data, or confidential messages.