Sherlock Holmes's Dancing Men Cipher

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Sir Arthur Conan Doyle invented and used a cipher in "The Adventure of the Dancing Men," which featured Sherlock Holmes, his famous detective [1]. It is a substitution cipher in which a letter is always represented by the same dancing man, with a flag to indicate the end of a word. Sherlock Holmes uses frequency analysis and some other clues to decipher the encrypted messages. Since the story does not cover all letters, this Demonstration uses additional characters from the free font GL-DancingMen-Org, by Gutenberg Labo [2].


Click the setter bar to write a message and see its representation in this cipher (up to 45 dancing men). Please note that in this cipher, a couple of letters followed by a space are not represented by a couple of dancing men; instead, they are represented by a single dancing man holding a flag. Therefore, when you click "space" after a letter, the dancing man corresponding to that letter will be replaced with the same dancing man holding a flag.


Contributed by: José Luis Gómez-Muñoz (December 2019)
Open content licensed under CC BY-NC-SA



[1] A. C. Doyle, The Return of Sherlock Holmes (1905 ed.). (Dec 6, 2019),_1905_edition/Chapter_3.

[2] Gutenberg Labo. "Dancing Men Font." (Dec 6, 2019)


Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.