Virtual Hagelin M-209

A 3D simulation of the Hagelin M-209 cipher machine

NOW LIVE! Commemorating D-DAY 80 - 6th June 2024

Find Out More Run Virtual Hagelin M-209

What is a Hagelin M-209 cipher machine?

In cryptography, the M-209, designated CSP-1500 by the Navy (C-48 by the manufacturer) is a portable, mechanical cipher machine used by the US military primarily in World War II, though it remained in active use through the Korean War.

The M-209 was designed by Swedish cryptographer Boris Hagelin and manufactured by Smith & Corona in Syracuse (New York, USA). It was based on the C-38 which itself was an improvement of an earlier machine, the C-36.

Crypto Museum says "The cryptographic strength of the machine was reasonable for its time, but was not perfect. As of early 1943, it was assumed that German codebreakers were able to break an M-209 message in less than 4 hours. Nevertheless, it was considered sufficiently secure for tactical messages which, due to their nature, would be meaningless after several hours. This is why the M-209 was later also used in the Korean War."

Hagelin History How does it work? How do I use the simulation?
What does it do?
Credits and Links


A number of people I need to say thanks and tip my hat to... .. The National Museum of Computing where my obsession was sparked! Make sure you find time to see their rebuilt and fully working Bombe and Enigma demonstrations at the museum but also so much more including Colossus and the galleries on the breaking of Lorenz, the WITCH & EDSAC, Elliott 308 and all manner of home computers you can use.

Deutsches Museum 3D-Cipher project .. Matthias Göggerle is a research associate in the 3D-Cipher project of the Deutsches Museum. They created several 3D CT scans of their historic cipher machines giving an amazing internal view inside these machines without damaging them. Matthias' assistance with the M-209 model was invaluable and allowed me to create a simulation with unprecendented accuracy and detail!
Take a look & download the other scans available on their website: .. Bletchley Park is an incredible site with an amazing story to tell and is so worth a visit (or two, or three). I'm still finding out new things about the work of the incredible men & women who served here during the war each time I visit.
Extra thanks to Thomas Cheetham, Research Officer at the Bletchley Park Trust.

3D software

A couple of amazing (and free to use) tools which enabled me to write Virtual Hagelin M-209

three.js is a cross-browser JavaScript library for creating 3D computer graphics in a web browser and an amazing piece of work. A big thank you to Mr.Doob for creating this wonder! a free and open source 3D creation suite which was used to create the models.


Creative Commons Licence
Virtual Hagelin M-209 by is licensed under a Creative Commons Attribution 4.0 International License.

Please feel free to use Virtual Hagelin M-209 to learn about the machine. If you find it useful or if you have any feedback or ideas for making it easier to use or understand, please do let me know.

It takes a long time to research and build these simulations and I love to hear about them being used, whether for your own information or in a classroom for STEM. Do please drop me a line to let me know if you do!

Let me know what you think!

Have I got something wrong, it doesn't work quite correctly on your computer or maybe you just want to say hi - find me on X/Twitter, Facebook, Mastodon or Instagram

Martin Gillow