Skip to content
100% local

Enigma machine

Simulate the WWII Enigma rotor cipher, with rotors, a reflector and a plugboard.

Input
Output

Enigma machine

This tool simulates the electromechanical Enigma machine used to encrypt German military messages in the Second World War: rotating rotors, a reflector and an optional plugboard that together scramble every letter you type. Paste a message, choose your settings and the tool encrypts or decrypts it instantly — useful for history lessons on classical cryptography, escape-room and geocaching puzzles, and CTF challenges built around Enigma.

The key sets where each rotor starts (like "AAA"), and the rotor order picks which of the three historical rotors — I, II and III — sits in each slot, each with its own wiring and turnover notch. The reflector (UKW-B or UKW-C) sends the signal back through the rotors a second time, and the plugboard swaps letter pairs before and after, exactly as the real Steckerbrett did — type pairs like "AB CD EF". A custom alphabet field lets you replace the standard A–Z ordering with any 26-letter permutation of your own. Because the machine is self-reciprocal, running the same settings over ciphertext decrypts it — encrypt and decrypt are the same operation, which is also why an Enigma operator never needed a separate decryption setting.

Turn on "Keep spaces and punctuation" to pass anything outside the alphabet through untouched, or off for solid historical-style ciphertext, and "Preserve case" to keep your original capitalization instead of forcing uppercase. Without a known key, enable brute force: the tool tries all 17,576 rotor starting positions for your chosen rotors, reflector and plugboard, scores each against expected English letter frequency, and lists the best-matching candidates. This is a simplified simulation — ring settings are fixed, and only rotors I–III and reflectors B/C are modeled — not a byte-for-byte replica of a wartime machine.

Everything runs locally in your browser. Nothing you paste is uploaded anywhere, which matters for a cipher tool as much as for the message it's demonstrating. Copy the result, download it as a .txt file, or send the output straight back into the input to run it through again.

FAQ

Why does decrypting use the same settings as encrypting?
The Enigma wiring is self-reciprocal: the same rotors, reflector, plugboard and starting key that turn plaintext into ciphertext will turn that ciphertext straight back into the plaintext. Real Enigma operators relied on exactly this property.
What does "Brute-force all keys" do?
It ignores the key field and tries every one of the 17,576 possible rotor starting positions for your chosen rotors, reflector and plugboard, scores each result by how closely its letter frequencies match English, and lists the closest matches as candidates.
Is this an exact replica of a real WWII Enigma?
No — it's a simplified simulation. It models rotors I, II and III with their historical wirings and turnover notches, plus reflectors B and C, but ring settings are fixed rather than adjustable, so results won't match a physical machine set to a non-default ring position.
What happens to accented letters, digits, emoji and punctuation?
They fall outside the working alphabet, so the machine never encrypts them. With "Keep spaces and punctuation" on they pass through unchanged in place; turn it off to strip them and keep only the enciphered letters.
Is my text uploaded anywhere?
No. The whole simulation — rotors, reflector, plugboard and brute force — runs in your browser. Nothing you type or paste here is sent to a server.