Chris Spackman's NeoCities Page

The Zimmermann Telegram

On January 16, 1917, German Foreign Minister Arthur Zimmermann sent a coded telegram to the German ambassador in Mexico. Its contents were explosive: a proposal for a military alliance between Germany and Mexico against the United States. British codebreakers intercepted and decoded it, and when the message was made public, it helped push America into World War I.

This is a story about how codebreaking changed history — and how the codebreakers then had to solve an even harder problem: revealing what they knew without revealing how they knew it.

Background

Room 40

When World War I began in 1914, one of Britain's first acts was to cut Germany's undersea telegraph cables. This forced German diplomatic messages onto routes that passed through British-controlled relay stations — where they could be copied.

The Admiralty established a secret codebreaking unit known as Room 40 (named after its office number). Led by Sir Alfred Ewing and later by Captain Reginald "Blinker" Hall, Room 40 employed linguists, classicists, and puzzle enthusiasts to decode intercepted German messages.

How Did Room 40 Get Germany's Codebooks?

Early in the war, Room 40 had extraordinary luck. In August 1914, the Russians recovered a German naval codebook from the wreck of the cruiser Magdeburg and shared it with Britain. Another codebook was pulled from a German ship seized by Australia. These captured codebooks gave Room 40 a critical head start, but the diplomatic codes used for the Zimmermann Telegram still required significant analytical work to break.

Germany's Dilemma

By early 1917, Germany was losing the war of attrition on the Western Front. German military leaders decided to resume unrestricted submarine warfare — sinking any ship, including neutral American ships, in the waters around Britain. They knew this would probably bring the United States into the war, but they gambled they could starve Britain into surrender before American forces could arrive.

As an insurance policy, Zimmermann proposed an alliance with Mexico: if the US entered the war, Germany would help Mexico reclaim territory lost in the Mexican-American War — Texas, New Mexico, and Arizona. Mexico was also asked to invite Japan to join the alliance.

The Coded Message

The telegram was encoded using a German diplomatic codebook known as Code 0075 (and partially re-encoded using Code 13040). In these code systems, words and phrases were replaced by four- or five-digit number groups. This is fundamentally different from the letter-substitution ciphers used in earlier centuries — instead of replacing individual letters, entire words are replaced by code numbers.

Here is a portion of the actual coded telegram (the number groups that Room 40 intercepted). Click any number to look it up in the partial codebook below:

Try the Codebook

Below is a simplified version of the code. In reality, the German codebooks contained thousands of entries, and Room 40 had to reconstruct them through months of painstaking work — comparing intercepted messages, guessing common diplomatic phrases, and testing hypotheses.

The Codebook (Partial)

This is a small subset of the codes used. A real diplomatic codebook would have thousands of entries.

The Decryption

Room 40 cryptanalysts Nigel de Grey and William Montgomery partially decoded the telegram on January 17, 1917 — just one day after it was sent. They quickly recognized its significance but faced several problems:

  1. Incomplete decode: They could not read every code group immediately. It took weeks to fill in the gaps.
  2. The source problem: If Britain simply handed the decoded telegram to the Americans, Germany would know its codes were broken and would change them. Britain needed to disguise how it obtained the message.
  3. The neutrality problem: The telegram had been partly routed through a cable that the US had allowed Germany to use for peace negotiations. Revealing this would embarrass the Americans.

The Cover Story

Captain Hall solved the source problem with a clever deception. British agents in Mexico obtained a copy of the telegram as it had been re-transmitted from Washington to Mexico City — this version used a slightly different code (13040 instead of 0075). By presenting this copy to the Americans, Hall could claim the message had been obtained in Mexico rather than intercepted on the transatlantic cable. This protected both Britain's codebreaking capability and American diplomatic sensibilities.

The Impact

The decoded telegram was given to the US Ambassador in London on February 23, 1917. President Wilson made it public on March 1. Many Americans initially believed it was a forgery — until Zimmermann himself confirmed its authenticity on March 3, astonishing everyone.

Combined with Germany's resumption of unrestricted submarine warfare, the Zimmermann Telegram helped turn American public opinion decisively in favor of entering the war. The United States declared war on Germany on April 6, 1917.

"I cannot deny it. It is true." — Arthur Zimmermann, confirming the telegram's authenticity, March 3, 1917

Lessons for Cryptography

Code vs. Cipher

The Zimmermann Telegram illustrates the difference between a code and a cipher. A cipher transforms individual letters according to a rule (like the Caesar cipher or Vigenère cipher). A code replaces entire words or phrases with arbitrary symbols (in this case, numbers). Codes require a codebook — essentially a dictionary — that both sender and receiver must possess.

Codes have a major advantage: since there is no mathematical relationship between the code numbers, techniques like frequency analysis do not apply directly. But they also have weaknesses: codebooks can be captured, they are inflexible (you can only say things that are in the book), and patterns in their use can be exploited over time.

The Intelligence Dilemma

Room 40's greatest challenge was not breaking the code — it was deciding what to do with the information. Using decoded intelligence always risks revealing that you have broken the enemy's codes. This tension between using intelligence and protecting its source is a fundamental problem that would recur throughout the 20th century, particularly at Bletchley Park during World War II.

Things to Try

Disclaimer: these pages are educational demos provided as-is, with no warranty of any kind. The author is not responsible for any consequences arising from their use.

Send comments and bug reports to chris@chrisspackman.com.

Version 0.1.1 — Last updated: 2026-07-02

This page is Copyright © 2025 – 2026 Chris Spackman <chris@chrisspackman.com>.
This web site developed entirely on GNU/Linux with Free / Open Source Software.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Creative Commons License