The Ottendorf Cipher (What it Is and How to Teach Your Kids)

We may receive commissions from purchases made through links in this post, at no additional cost to you.

It’s Friday night, which means it’s family movie night. On the roster for tonight’s entertainment: National Treasure. One of my favorite movies and the first time watching (of what I’m sure is about to be many times) for my kids. 

It’s in the middle of the movie when I’m hit with inspiration for my next activity with my kids: the Ottendorf Cipher. And while I can’t write the codes in invisible ink on the back of the Declaration of Independence, I’m sure I can come up with some clever ways to turn this into a fun activity.

What is an Ottendorf Cipher

An Ottendorf Cipher is a variation of a Book Cipher (or Book Code). Each letter of the original text (plaintext) is substituted with three numbers (ciphertext) that correlate with a letter on a single-page document that serves as the key. The first number represents the line, the second number relates to the word from that line, and the last number relates to the letter from that word. 

The difference between a book cipher and an Ottendorf cipher is that the three numbers of a book cipher relate to a word in a multiple page text. An Ottendorf cipher relates to a specific letter in a single page document. 

Generally, I have found it easier to encode a text using an Ottendorf cipher because it is easier to find most if not all letters of the alphabet in a single page of a document. When encoding using a book code, you must find a specific word (which may or may not exist) in a specific book. 

That being said, the ciphertext of an Ottendorf cipher is much longer than a book cipher because you need to encode every individual letter rather than each word like you do in a book cipher. 

If you want to learn a similar code to the Ottendorf Cipher, check out The Book Cipher (What it Is and How to Teach Your Kids).

This article is originally from

The Ottendorf Cipher and National Treasure

(*spoiler alert*) In the movie National Treasure, Ben Gates (Nicholas Cage) is able to discover and decode a secret Ottendorf Cipher written in invisible ink on the back of the Declaration of Independence. Being a document of such importance, the Declaration of Independence is guaranteed to never be destroyed. 

The key text to decode the secret message was the original Silence Dogood letters. Silence Dogood is a pseudonym of Benjamin Franklin. At 16, young Franklin tried to have his letters published in a local newspaper, The New-England Courant

Benjamin Franklin

James Franklin, Benjamin Franklin’s older brother, founded and early American newspaper called The Courant. It was one of the few papers critical of British colonial government in the colonies.

After multiple rejections, Benjamin created the persona of a middle-aged widow names Silence Dogood. Ever couple weeks, he would leave a letter at the door of his brother’s printing shop. James liked the letters so much, he published them in his newspaper. The Courant published a total of 14 letters. 

Franklin’s writings as Silence Dogood were so popular, single men from Boston sent marriage proposals to what they thought was a real widow. 

James Franklin destroyed the original Silence Dogood letters when he discovered Benjamin’s secret identity. In the movie, however, the side story is that Ben Gates’ family discovered the original letters in a desk. In reality, even though the original letters no longer exist, the content of the letters still survive. 

If you want to learn about another cipher used in history, check out The Scytale Cipher (What It Is and How to Teach Your Kids).

But enough of that for now. Let’s move on to how to use this cipher. 

This article is originally from

How to Encode and Decode Messages Using an Ottendorf Cipher

The key to an Ottendorf cipher is a text or document used by both the message sender and receiver to encode and decode messages. 

It is important that both sender and receiver use the same edition or version of the text. Since you substitute each letter with a specific location to the letter on the document, it is important that all the words on the document are positioned in the same place. 

To encode a message using an Ottendorf cipher, replace each letter of the original message (plaintext) with a set of three numbers related to a predetermined document (ciphertext). 

For example, I will use a version of Abraham Lincoln’s Gettysburg Address to encode the following message:

“Two guys walked into a bar. The third guy ducked.”

I’ll then find corresponding letters in the Gettysburg Address and write out three numbers that locate each letter.

The first number represents the line number (beginning with the body of the text and skipping any titles), the second represents the word on that line, and the last number represents the letter of that word. 

The first letter of the text I want to encode, “T” is on line 2, in the 1st word, 4th letter. So I would replace the letter with “2.1.4” and so on until I completed my message. 

The entire message would look like this:

2.1.4    4.2.1     5.1.1     6.4.1    11.6.4    2.7.7     10.5.1   2.3.3    1.5.3    2.7.1    15.10.4
1.4.2    10.9.1   4.5.1     4.1.1     4.10.1   6.2.1     4.3.1     10.1.1    6.3.1    3.1.2    9.1.1
4.10.2  1.2.5    2.1.4     4.11.2   4.5.1     3.1.2     5.5.9     4.4.5    11.6.4  1.5.1    5.5.9  
9.3.4    3.6.1    18.5.3   3.7.1     5.8.3      

When writing out the numbers, you can try to find ways to group them into their corresponding words, but I find it simplest just to list all the numbers. You can then group the decoded message into separate words.

To decode simply work backward. Take the numbers of your ciphertext and replace them with the corresponding letters.

If you want another great easy secret code for your kids, check out The Caesar Cipher (What it Is and How to Teach Your Kids).

This article is originally from

Ottendorf Cipher Activity Ideas (Plus a Free Worksheet)

Teaching your kids how to do an Ottendorf cipher is super easy and doesn’t take more than a minute to explain to your kids. Change the passcode for the family iPad, decode the new number (spell it out using full words for the numbers), hand your kids the ciphertext with the key document, and let them earn their technology time for the day. 

Learn more: 6 Secret Codes and Ciphers to Teach Young Kids

If you’re looking for something a little more structured, here is a free downloadable worksheet to teach the Ottendorf cipher with your kids. 

If you’re like me and you want to make it a little more elaborate, you can always “discover” an old framed document in the attic. This document can be a copy of some historical document like a famous speech, a letter from a historical figure, or even the Declaration of Independence (if it ain’t broke…). 

Print out the document, weather the whole paper by ripping the edges and soaking it briefly in coffee or tea (you can learn how to weather paper here), and write a code on the back. The code leads your kids on a treasure hunt throughout your house (you can also check out How to Make Your Own Ottendorf Treasure Hunt and see exactly how I did this with my own kids.)

For more great treasure hunt ideas, check out:

Gregory Grabowski

Greg Grabowski is the principal creator of, a website for dads by dads. Inspired by his two boys Ben and Sam and his wife Dianna, Greg loves to make things, learn things, and loves doing fun stuff with his family.

Related Posts