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.
Dancing Men Cipher - dCode
Tag(s) : Symbol Substitution
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!
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.
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.
| a | ![]() | b | ![]() | c | ![]() | d | ![]() | e | ![]() | f | ![]() | g | ![]() |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| h | ![]() | i | ![]() | j | ![]() | k | ![]() | l | ![]() | m | ![]() | n | ![]() |
| o | ![]() | p | ![]() | q | ![]() | r | ![]() | s | ![]() | t | ![]() | u | ![]() |
| v | ![]() | w | ![]() | x | ![]() | y | ![]() | z | ![]() | ||||
| dCode.fr | |||||||||||||
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.
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.
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.
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
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.
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:
In a scientific article or book, the recommended bibliographic citation is: Dancing Men Cipher on dCode.fr [online website], retrieved on 2026-03-20,