Search for a tool
Dancing Men Cipher

Tool to decrypt/encrypt dancing men code (cipher used in the Sherlock Holmes book of the same name). A monoalphabetic substitution cipher made of little men displayed with legs and arms dancing.

Results

Dancing Men Cipher -

Tag(s) : Symbol Substitution

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Dancing Men Cipher' tool for free! Thank you!

Dancing Men Cipher

Dancing Men Decoder




Dancing Men Encoder

 




Answers to Questions (FAQ)

What is the Dancing Men Cipher? (Definition)

The Dancing Men cipher is a fictional code appearing in Arthur Conan Doyle's short story The Adventure of the Dancing Men.

In the story, strange drawings of small dancing men appear around a manor house. Sherlock Holmes realizes that these drawings constitute a coded message.

Holmes manages to solve the mystery by analyzing these symbols and applying classic cryptanalysis techniques, including frequency analysis.

How to encrypt using Dancing Men cipher?

The Dancing Men cipher relies on a simple substitution: each letter of the alphabet is replaced by a small stylized figure in a different pose. The encoding therefore simply consists of replacing each letter of the plaintext with the corresponding dancing humanoid symbol.

achar(97)bchar(98)cchar(99)dchar(100)echar(101)fchar(102)gchar(103)
hchar(104)ichar(105)jchar(106)kchar(107)lchar(108)mchar(109)nchar(110)
ochar(111)pchar(112)qchar(113)rchar(114)schar(115)tchar(116)uchar(117)
vchar(118)wchar(119)xchar(120)ychar(121)zchar(122)
dCode.fr

Example: SHERLOCK translates to char(115)char(104)char(101)char(114)char(108)char(111)char(99)char(107)

In the short story, some characters hold a small flag that marks the end of a word, allowing the sentence to be broken down into words.

In the messages within the story, only 18 different letters appear. 8 letters (FJKQUWXZ) were not used and therefore have no known symbols. Also the P and the V use almost exactly the same symbol in the short story. dCode presents on this page the most common complete variant on the Internet (source unknown) with the letters F, J, K, Q, U, W, X, Z (which were created) and the P and V are slightly differentiated.

How to decrypt Dancing Men cipher?

The deciphering consists of performing the reverse operation: each dancing man symbol is replaced by the corresponding letter.

Some men sometimes have a flag, in the original short story they indicate a word separator (or word ending).

In the short story, Sherlock Holmes uses the method of frequency analysis to determine that it is a monoalphabetic substitution.

How to recognize Dancing Men ciphertext?

A message using the Dancing Men cipher consists of small stick figures depicted in various poses, gesturing or dancing.

Their arms and legs change orientation to create distinct symbols.

Some figures hold a small flag, indicating the end of a word.

In the short story, these drawings are described as stick men or as absurd little figures dancing across the paper.

Certain narrative elements may also serve as clues: a reference to Sherlock Holmes, to Dr. Watson (who, however, does not appear in the story), or to the characters of Hilton Cubitt and Abe Slaney.

When was Dancing invented?

The Dancing Men figure first appears in Arthur Conan Doyle's short story The Adventure of the Dancing Men.

This story was published in December 1903 in The Strand Magazine and then included in 1905 in the collection The Return of Sherlock Holmes.

The full story is availableavailable here

Source code

dCode retains ownership of the "Dancing Men Cipher" source code. Any algorithm for the "Dancing Men Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Dancing Men Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Dancing Men Cipher" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Dancing Men Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/dancing-men-cipher

In a scientific article or book, the recommended bibliographic citation is: Dancing Men Cipher on dCode.fr [online website], retrieved on 2026-03-20, https://www.dcode.fr/dancing-men-cipher

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Dancing Men Cipher' tool for free! Thank you!


https://www.dcode.fr/dancing-men-cipher
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback