People throughout history have kept personal diaries, and some have even made their names primarily through working as diarists. More unusual, however, are those who penned their innermost thoughts in secret code. Here are some of the most notable people in history who wrote their journals using codes and ciphers.

1. Beatrix Potter

Beatrix Potter began keeping a coded diary as a teenager.Riversdale Estate, Flickr // Public Domain

Beloved children’s author Beatrix Potter (1866–1943) was best known for her stories like The Tale of Peter Rabbit. But she also kept a series of diaries in a code of her own making from the age of 15 to 30. While Potter never discussed her reasons for creating the code, her biographer Linda Lear speculated that it stemmed from her constricted upbringing and a wish to express herself more freely in secret than she could in everyday life.

These codes would later prove extremely difficult for scholars to decipher. After Potter's death, a long-time admirer of her work named Leslie Linder spent more than five years trying to decode them without success. He finally made a breakthrough after noticing a page that mentioned “1793” and the number 16 in Roman numerals (XVI), and realized these two numbers were connected through Louis XVI of France, who had been guillotined in 1793. This led him to decode a nearby word as “execution.” Linder was then able to unlock the rest of Potter’s secret code relatively quickly. Once deciphered, the diaries revealed detailed notes about her daily life, including transcriptions of conversations she observed between other people.

2. Franklin D. Roosevelt

As with all presidents, the details of Franklin D. Roosevelt (1882–1945)’s life have been extensively gathered and recorded. But parts of his inner world remained a mystery, as sections of a private diary Roosevelt kept in his early twenties were written in a secret code.

Dr. Nona Ferndon discovered the coded diary in 1970 and shared it with several other cryptographers. She cracked the code by realizing Roosevelt substituted certain letters for others. The decryption of the contents was confirmed in January 1972, revealing various details about his life and love interests.

3. Samuel Pepys

Samuel Pepys (1633–1703) is one of the best-known diarists in the history of English literature, although his diaries didn't become public until more than a century after his own death. His chronicle of London in the late 17th century, including the plague of 1665–1666, has become an important source for historians of the period. But during his own lifetime, the contents of those pages remained extremely private.

Pepys wrote his diary using a form of shorthand invented by the stenographer Thomas Shelton. To most observers, the contents of the diary would have seemed a mysterious cipher or code, which helped keep the contents of his private life a secret. Pepys enjoyed using codes so much that he even invented some for others to use. He eventually stopped writing his journal when his eyesight began to decline, although he did not turn blind as he feared. The contents of his diary were transcribed from code into English in the early 19th century and were published for the first time in 1825.

4. Charles Wesley

Charles Wesley (1707–1788) was an English Methodist most commonly associated with the thousands of hymns he wrote. However, he also authored another work that totaled over 1000 pages of manuscript: his diaries, which were written in a secret code that remained unbroken for 270 years.

Professor Kenneth Newport, who had previously worked on Wesley’s religious writings, eventually deciphered the diaries. Wesley had transcribed four of the gospels into a code similar to the one used in his diaries. Newport spent nearly a decade transcribing Wesley's diaries, and, thanks to his knowledge of the original gospels, was ultimately able to work out what the code represented.

Once the code was deciphered, Charles’s diary offered many insights into his relationship with his brother John, including their religious disagreements and Charles’s resentment over John reversing their agreement that neither of them would ever marry. (Codes were common in the Wesley family; John also kept a coded diary.)

5. Ludwig Wittgenstein

1929 portrait of Ludwig Wittgenstein.Clara Sjögren, Wikimedia Commons // Public Domain

The idea of a secret language comprehensible only to the person who created it was a concept philosopher Ludwig Wittgenstein (1889–1951) wrestled with in his work. It was also something he had personal experience with.

Ludwig created his own clandestine code to use in a diary he first kept while serving in the Austrian Army in World War I [PDF]. He began using the code in August 1914 to prevent other soldiers from reading his private journals. During the 1960s, the diary was deciphered by two of his literary executors, Georg Henrik von Wright and Elizabeth Anscombe, who worked out that Wittgenstein had inverted the letters of the alphabet to create the code.

6. Olga Romanov

Olga Romanov (1895–1918) was the eldest daughter of Russia’s last Tsar, Nicholas II. She began writing a diary in 1905 and kept it for more than a decade. As a young woman, she sought ways to keep her most private thoughts secret, using codewords to refer to men on whom she had crushes. Romanov sometimes used an initial to refer to mens' nicknames rather than their given names. She used code most prominently when discussing her feelings for Pavel Voronov, a man with whom she fell in love and dreamed of marrying, but who became engaged to someone else instead.

Romanov stopped writing her diary when her father was forced to abdicate in 1917. The following year, she and the rest of her family were murdered. After her death, her diaries were retrieved and preserved, along with other papers belonging to the family, and were eventually made available to scholars. A researcher named Maria Zemlyanichenko spotted the recurring use of initials to refer to different people and was able to work out some of their identities. The diary was later translated into English by Helen Azar and published in 2013.