Introduction
In 1794, a message traveled from Lille to Paris in under ten minutes. A horseback rider would have taken days. The Chappe semaphore telegraph, invented by Claude Chappe and his brothers, used towers with mechanical arms visible from kilometers away. Each tower repeated the signal to the next, relay-fashion, across a network that eventually spanned all of France. The system encoded 196 distinct symbols using a main arm (the regulator) and two indicator arms, each positioned at one of seven angles. This tool encodes text into Chappe semaphore codes and displays the arm positions on an animated tower visual. Type a message and watch the arms move, or paste code numbers to decode them back to text.
What this tool does
- Encodes text into Chappe semaphore code numbers (1-196) using a mapping where codes 1-26 represent A-Z, 27-36 represent digits 0-9, and 37+ represent common French words from the historical codebook
- Decodes semaphore code numbers back to text by looking up each number in the codebook and assembling the corresponding letters, digits, or words
- Displays an animated SVG tower visual showing the regulator and two indicator arms at their correct angles for each code, with step-through playback controls
- Shows the arm angles in degrees for each code (regulator, left indicator, right indicator) so you can verify the mechanical positions match the encoding
- Includes a browsable encoding table showing the first 50 code-to-meaning mappings, covering the full alphabet and common words
- Processes all encoding and decoding locally in your browser with no data transmission
How this tool works
The tool maps each code number to three arm positions using a base-7 decomposition. The code number (1-based) is converted to a 0-based index, then split into three digits: the regulator position is index mod 7, the left indicator is floor(index / 7) mod 7, and the right indicator is floor(index / 49) mod 7. Each position corresponds to an angle of 0, 45, 90, 135, 180, 225, or 270 degrees. This gives 7 x 7 x 7 = 343 theoretical combinations, of which the historical system used 196.
In encode mode, the tool processes input text character by character. Letters A-Z map to codes 1-26, digits 0-9 map to codes 27-36, and common French words (ET, OU, ROI, ARMEE, etc.) are matched greedily from longest to shortest. The animated tower visual steps through each encoded character, showing the arm positions for one second per character. Play, pause, previous, and next controls let you navigate the sequence.
In decode mode, the tool parses space- or comma-separated code numbers and looks up each one in the codebook. The tower visual displays the arm positions for the first valid code in the input. The encoding table shows the mapping for the first 50 codes so you can look up values manually.
How the Chappe semaphore telegraph works
Claude Chappe (1763-1805) was a French inventor who, with his brothers, developed the optical telegraph during the French Revolution. The first operational line opened between Paris and Lille in 1794, covering 230 kilometers with 22 stations. The network expanded rapidly under Napoleon, reaching as far as Venice and Antwerp. At its peak, the French semaphore network comprised over 500 stations.
Each tower had a vertical post with a horizontal main arm called the regulator (regulateur) and two smaller indicator arms (indicateurs) attached to the ends of the regulator. The regulator could rotate to 7 positions (angles of 0, 45, 90, 135, 180, 225, 270 degrees), and each indicator could independently rotate to the same 7 positions. This gave 7^3 = 343 theoretical combinations. Chappe assigned 196 of these to meaningful codes: letters, digits, common words, and operational signals. The encoding was designed for French military and administrative communication, so common words like ROI (king), ARMEE (army), and GUERRE (war) had their own single codes.
Gerard J. Holzmann documented the Chappe system in detail in "Picturing Communication: Early Pictures of the Telegraph" (IEEE Communications Magazine, 1994) and in his book "Design and Validation of Computer Protocols" (Prentice Hall, 1991), where he used the Chappe telegraph as a case study in protocol design. Holzmann's research, available through his Bell Labs page, includes reproductions of the original code tables and station layouts.
The system had a major weakness: it required line-of-sight between towers. Fog, rain, or darkness halted communication. It also had no encryption built in; anyone with a telescope and a copy of the codebook could read the signals. The French addressed this by using a secret codebook (a code) that changed periodically, so even if the arm positions were observed, the meaning was not obvious. For a visual signaling system that uses flags instead of mechanical arms, see the Flag Semaphore tool. For other communication codes, see the Tap Code tool and the Morse Code translator.
How to use this tool
- Choose a mode: Encode to convert text to semaphore codes, or Decode to convert code numbers back to text.
- For encoding, type or paste your text. Letters A-Z and digits 0-9 are encoded directly. Common French words (ET, ROI, ARMEE, etc.) are matched automatically.
- The output field shows the code numbers separated by spaces. The tower visual animates through each code if you press Play.
- Use the Prev, Play, and Next buttons to step through the encoded sequence. Each step shows the character, its code number, and the three arm angles.
- For decoding, paste code numbers (1-196) separated by spaces or commas. The tool looks up each number and assembles the decoded text.
- Browse the encoding table to see the first 50 code-to-meaning mappings, covering the alphabet and the first common words.
Real-world examples
Encoding a military dispatch
Input: "ARMEE DE PARIS". The tool matches "ARMEE" as a common word (code 144), "DE" as a common word (code 106), and "PARIS" letter by letter (P=16, A=1, R=18, I=9, S=19). The output is "144 106 16 1 18 9 19". The tower visual steps through each code, showing the arm positions. This demonstrates how the codebook compressed frequent words into single codes while spelling out uncommon words letter by letter.
Decoding a received signal
A student receives the code sequence "18 15 9 13 5" and enters it in decode mode. The tool looks up each number: 18=R, 15=O, 9=I, 13=M, 5=E. The decoded text is "ROIME". The student realizes this should be "ROI" (code 123) followed by "ME" but was sent letter by letter, perhaps by an operator who did not have the word code memorized. This shows the difference between letter-by-letter encoding and codebook encoding.
Stepping through the tower animation
Input "BONJOUR" and press Play. The tower visual animates through 7 codes (B=2, O=15, N=14, J=10, O=15, U=21, R=18). At each step, the SVG shows the regulator and indicator arms at their correct angles. The step counter shows "Step 3 of 7: N (code 14)" with arm angles displayed below. This visualizes how a Chappe operator would have set the arms for each character in sequence.
Encoding with common word codes
Input "LE ROI ET LA REINE" and compare the output with and without word matching. With word matching, "LE" (code 101), "ROI" (code 123), "ET" (code 109), "LA" (code 102), and "REINE" (code 124) each produce a single number. The output is "101 123 109 102 124" (5 codes). Without word matching, the same phrase would require 17 letter codes. This compression was the primary advantage of the Chappe codebook over letter-by-letter transmission.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| Chappe semaphore | 196 codes, 3 arms x 7 positions | French telegraph network, 1794-1852 |
| Flag semaphore | 2 flags x 8 positions, 26 letters | Naval communication, visual range |
| Morse code | Variable-length dots and dashes | Telegraph and radio communication |
| Tap code | 5x5 grid, 2 taps per letter | POW communication, no equipment |
| Smoke signals | Variable puffs, no fixed alphabet | Ancient and indigenous communication |
Limitations or considerations
This tool uses a simplified codebook. The historical Chappe system had 196 codes that included operational signals (error, repeat, end of message) and a separate vocabulary code that changed periodically for security. This tool maps codes 1-26 to letters, 27-36 to digits, and 37+ to a fixed set of common French words. The real system's codebook was secret and varied by line and period.
The animated tower visual is a 2D SVG representation. The real Chappe towers were 3D structures with arms visible from kilometers away, and operators used telescopes to read neighboring towers. The visual here shows the arm positions but not the scale or the relay mechanism.
The tool does not implement the secret codebook layer that the French used for security. In the real system, the arm positions encoded a number, and that number was looked up in a secret codebook that changed daily. Without the codebook, observing the arm positions revealed only meaningless numbers. For a system that includes encryption, see the Tap Code tool or the Morse Code translator.
Frequently asked questions
How fast was the Chappe semaphore telegraph?
A message could travel from Paris to Lille (230 kilometers, 22 stations) in about 6 to 10 minutes. A horseback rider covering the same distance would take roughly 30 hours. The speed depended on weather conditions and operator skill. Each station relay took about 1 to 2 minutes as the operator read the incoming signal with a telescope and set the arms for the next station.
Why did the system use only 196 of the 343 possible combinations?
Some arm positions were difficult to distinguish from a distance, especially when the regulator and indicators were at similar angles. Chappe excluded ambiguous combinations. The remaining 196 codes were sufficient for the alphabet, digits, common words, and operational signals. Later versions of the system expanded the codebook as operators became more skilled at reading positions.
Was the Chappe telegraph encrypted?
Not by itself. The arm positions encoded numbers that anyone with a telescope and the standard code table could read. The French added a layer of security by using a secret vocabulary codebook that mapped the numbers to words or phrases. This codebook changed periodically, so even if the arm positions were observed, the message content remained protected. The system was eventually replaced by the electric telegraph in the 1850s.
How does the Chappe semaphore differ from flag semaphore?
The Chappe system used mechanical arms on fixed towers, visible from kilometers away, operated by trained personnel. Flag semaphore uses a person holding two flags at arm's length, visible only at much shorter range (typically a few hundred meters). The Chappe system had 196 codes including whole words; flag semaphore has 26 letter codes and is used for spelling out messages letter by letter. See the Flag Semaphore tool for comparison.
What happened to Claude Chappe?
Claude Chappe committed suicide in 1805, reportedly due to disputes over credit for the invention and depression. His brothers continued to operate the system. The semaphore network he created remained in service until 1852, when the electric telegraph replaced it across France. The term 'telegraph' itself was coined by Chappe from the Greek words for 'far' and 'write.'
Conclusion
The Chappe semaphore telegraph was the first practical telecommunications network, predating the electric telegraph by half a century. Its mechanical arms and relay towers carried messages across France at speeds that seemed miraculous at the time. This tool shows how the three-arm encoding worked, with an animated tower visual that steps through each code. For other visual and auditory communication systems, see the Flag Semaphore tool, the Tap Code tool, and the Morse Code translator.