Search for a tool
Mary Stuart Code

Tool to decrypt/encrypt according to Mary, Queen of Scots. Mary Stuart code is a substitution cryptogram by symbols extended to the words used by the Queen of Scots.

Results

Mary Stuart Code -

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 'Mary Stuart Code' tool for free! Thank you!

Mary Stuart Code

Mary Queen of Scots Decoder

(Babington Plot Version)

Mary Queen of Scots Encoder

(Babington Plot Version)

 

Answers to Questions (FAQ)

What is the Mary Stuart Code? (Definition)

Mary Stuart (1542-1587), Queen of Scots, spent nearly twenty years captive in England. During her captivity, she continued to correspond with her allies. To protect her secrets from the spies of Elizabeth I, she used entirely encrypted letters. The entire collection of coded/encrypted correspondence constitutes a corpus of several dozen letters, some of which have historical value.

How to encrypt using Mary Stuart cipher?

The cipher developed by Mary Stuart primarily used homophonic ciphers. This meant that multiple symbols could represent the same letter. Throughout the correspondence, there are 219 distinct symbols, as well as a system of diacritics (dots, dashes) to distinguish variants of a symbol. Some symbols represented entire words, proper nouns, or frequently occurring syllables, or even instructions to delete or repeat a letter.

The complete alphabet (also called the nomenclator) was regularly changed but kept secret between her and her correspondents.

Example: an alphabet found visible at the UK National Archives mary-alphabet-uk-archive

The most famous alphabet is the one used in the Babington Plot, led by Sir Anthony Babington, which aimed to kill Queen Elizabeth I so that Mary Stuart could take the throne. This is the alphabet proposed on this page: alphabet

Example: MARY is encoded as char(77)char(65)char(82)char(89)

The alphabet contains 5 blank characters that can be used as decoys or word separators (which complicates frequency analysis).

How to decrypt Mary Stuart cipher?

Deciphering the Mary Stuart cipher involves matching the symbols used to the letters (or words) in plaintext according to a correspondence table agreed upon between the sender and recipient of the message.

Example: Using the Babington plot alphabet, char(81)char(85)char(69)char(69)char(78) translates to QUEEN

Who was Mary Queen of Scots?

Mary Stuart (or Mary I of Scotland) was born December 8, 1542 (and died February 8, 1587) was the Queen of Scotland from 1542 to 1567 and Queen consort of France between 1559 and 1560.

She was convicted of conspiring to assassinate the Queen of England during the Babington plot.

A book is dedicated to her and her code here (affiliate link)

How were the letters decoded?

While some correspondence was decoded using discovered or intercepted nomenclators, several dozen letters remained illegible for nearly 500 years.

In 2023, three researchers transcribed the symbols using computer tools and then applied cryptological analysis. They identified plausible sequences in French and gradually reconstructed the correspondences. Plaintext copies found in English archives confirmed the correspondences.

The corpus used covers missives from the period 1578–1584, representing approximately 50,000 words. In it, Mary discusses her captivity, her diplomatic strategies, her support for the marriage between the Duke of Anjou and Elizabeth I, her complaints against the Earl of Leicester, and her hopes for an alliance with Spain. They also reveal her efforts to maintain a secret network of communications.

More information in the scientific article here

Source code

dCode retains ownership of the "Mary Stuart Code" source code. Any algorithm for the "Mary Stuart Code" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Mary Stuart Code" 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 "Mary Stuart Code" 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 "Mary Stuart Code" 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/mary-stuart-code

In a scientific article or book, the recommended bibliographic citation is: Mary Stuart Code on dCode.fr [online website], retrieved on 2025-10-17, https://www.dcode.fr/mary-stuart-code

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 'Mary Stuart Code' tool for free! Thank you!


https://www.dcode.fr/mary-stuart-code
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback