Crypto Tools
A1Z26 Cipher ADFGVX Cipher Affine Cipher Atbash Cipher Bacon Cipher Blowfish Cipher Cryptogram Solver Dancing Men Cipher Diffie-Hellman Gronsfeld Cipher HMAC-SHA256 Masonic Cipher Merkle Tree Generator
Other Tools
Dev Tools File Viewer Converter AI Tools
Polyalphabetic Substitution Cipher

Beaufort Cipher
Encoder & Decoder

A self-reciprocal cipher used in Victorian naval codes. Encrypt and decrypt with Tableau, Autokey, Variant modes — plus brute-force key cracking and IC analysis.

Standard Beaufort Variant Beaufort Autokey Tableau View Brute-Force IC Analysis
Please enter some text to process.
Non-alphabetic characters are preserved as-is.
Key must contain at least one letter.
Letters only are used from the key. Case insensitive.
Result
Your encrypted / decrypted output will appear here…
⚠️ Disclaimer: The Beaufort Cipher is a classical cipher intended for educational and historical study purposes only. It is not suitable for protecting sensitive data in modern applications. "Beaufort" refers to the cipher attributed to Sir Francis Beaufort (1774–1857) and is not affiliated with any trademark holder.

The Beaufort Tableau is a 26×26 grid. To encrypt letter P with key letter K: find row K, scan across to find P, read the column header — that column header is the ciphertext letter.

Enter ciphertext and specify a key length to brute-force the Beaufort key. The tool uses quadgram frequency scoring to rank the most likely plaintexts.

Longer keys take more time. Use IC Analysis tab to estimate key length first.

Paste any text to analyse frequency distribution, Index of Coincidence, entropy, and estimated key length.

Your last 10 operations are saved here in this session.

No history yet. Run an encryption to get started.

Advanced Beaufort Cipher Features

Everything you need to learn, experiment with, and crack the Beaufort Cipher — all in one page.

🔁
Self-Reciprocal Operation
Standard Beaufort uses the same process for both encryption and decryption — one operation does both, unlike Vigenère.
📋
Interactive Tableau
Visualise the full 26×26 Beaufort square with clickable highlighting to see exactly how each letter pair maps.
🤖
Brute-Force Cracker
Quadgram scoring engine ranks the most likely key guesses for known-length keys — no manual frequency counting needed.
📊
Index of Coincidence
Automatic IC calculation per sub-alphabet helps you estimate the key length from ciphertext alone.
🔑
Autokey Variant
Primed autokey mode extends the key with plaintext, eliminating repetition and strengthening the cipher significantly.
📂
Export & Download
Download your ciphertext or analysis as a .txt file instantly — no registration, no data stored on our servers.
📜
Session History
Your last 10 encode/decode operations are kept in session memory so you can compare results easily.
🌙
Dark & Light Theme
Full dark/light theme toggle with persistent preference via localStorage — easy on the eyes at any time of day.

How to Use the Beaufort Cipher Tool

01
Enter your text
Paste or type the plaintext (or ciphertext if decrypting) into the input field on the Encode/Decode tab.
02
Set your keyword
Type any word or phrase as your key. Only letters are used — spaces, numbers, and symbols are ignored.
03
Choose your variant
Select Standard Beaufort (C = K − P) or Variant Beaufort (C = P − K). Toggle Autokey for stronger encryption.
04
Encrypt / Decrypt
Click the button. Since Standard Beaufort is reciprocal, the same action encrypts and decrypts — just swap input/output.
05
Analyse & Crack
Switch to the Analysis tab to measure IC and estimate key length, then use Brute-Force to find the key automatically.
06
Export your result
Copy to clipboard or download your output as a text file. Check History to revisit past operations any time.

Understanding the Beaufort Cipher

What Is the Beaufort Cipher?

The Beaufort Cipher is a classical polyalphabetic substitution cipher closely related to the Vigenère cipher, but with one elegant twist: it is self-reciprocal, meaning you use exactly the same operation to both encrypt and decrypt. Named after British Admiral Sir Francis Beaufort (1774–1857) — better known today for the Beaufort wind scale — this cipher was widely used in diplomatic and military communications during the 19th century.

How Does the Beaufort Cipher Work?

Encryption follows the formula C = (K − P) mod 26, where C is the ciphertext letter, K is the key letter, and P is the plaintext letter. In the Beaufort tableau — a 26×26 grid — you find the row labelled by your key letter, locate the plaintext letter within that row, and read the column header as your ciphertext character. Because the formula is symmetric, the same lookup reverses itself: using the same key to "encrypt" the ciphertext produces the original plaintext without any mode switch.

Beaufort vs Vigenère: What's the Difference?

Vigenère encryption uses C = (P + K) mod 26, whereas Beaufort reverses this to C = (K − P) mod 26. This seemingly small change makes Beaufort reciprocal and removes the need for a separate decryption step. A third closely related cipher, the Variant Beaufort (sometimes called Della Porta), uses C = (P − K) mod 26 — which is equivalent to Vigenère decryption. The Variant Beaufort is not self-reciprocal, so it requires separate encrypt and decrypt procedures.

What Is Autokey Mode?

Standard Beaufort repeats the keyword cyclically, creating patterns attackers can exploit using the Kasiski examination. The Autokey variant solves this by starting with a short priming keyword and then extending the key using the plaintext itself. This prevents periodic repetition and significantly increases resistance to frequency analysis — at the cost of cascading decryption errors if any character is lost.

How to Break a Beaufort Cipher

Like all polyalphabetic ciphers, Beaufort is vulnerable to the Kasiski test and the Index of Coincidence (IC) method. A ciphertext encrypted with a short repeating key will show recurring trigrams at intervals equal to multiples of the key length. Once the key length is known, each sub-alphabet is essentially a simple Caesar-shift, crackable by frequency analysis in seconds. Our built-in brute-force engine automates this using quadgram frequency scoring — comparing each candidate decryption against known English letter-quad frequencies to rank the most likely keys.

Historical and Educational Significance

The Beaufort Cipher represents an important stepping stone in the history of cryptography — sitting between the simple monoalphabetic substitution ciphers of antiquity and the mechanically generated polyalphabetic ciphers of the 20th century, such as the Enigma machine. Understanding its mechanics gives deep insight into why modern encryption standards like AES are so much more robust, and why key management, key length, and non-repeating key schedules matter so profoundly in protecting real-world data. Whether you are a student learning classical cryptography, a puzzle enthusiast, or a historian, the Beaufort Cipher is an ideal cipher to study.

Frequently Asked Questions

What is the Beaufort Cipher?
The Beaufort Cipher is a polyalphabetic substitution cipher similar to Vigenère but uses a reversed formula C = K − P mod 26. Its key feature is that it is a self-reciprocal (involutory) cipher — you encrypt and decrypt using the exact same procedure with the same key.
How does Beaufort differ from Vigenère?
Vigenère encrypts with C = (P + K) mod 26 and decrypts with P = (C − K) mod 26 — two different operations. Beaufort uses C = (K − P) mod 26 for both directions, making it reciprocal. Applying the Beaufort operation to its own ciphertext with the same key always returns the original plaintext.
What is the Variant Beaufort Cipher?
The Variant Beaufort (also called the Porta variant) uses C = (P − K) mod 26. This is mathematically equivalent to Vigenère decryption. Unlike standard Beaufort, it is not self-reciprocal — you need a separate decrypt step with a different formula.
What is Autokey Beaufort and why use it?
Autokey Beaufort starts with a short priming keyword, then extends the key using the plaintext itself (for encryption) or the recovered plaintext (for decryption). This eliminates the periodic repetition that makes standard Beaufort vulnerable to the Kasiski examination and Index of Coincidence attacks.
How can I crack a Beaufort Cipher without the key?
First, estimate the key length using the Index of Coincidence or the Kasiski test (look for repeated trigrams at regular intervals). Once you know the key length, split the ciphertext into sub-alphabets and apply single-letter frequency analysis to each. Our Brute-Force tab automates this with a quadgram scoring engine for keys up to 6 letters long.

Explore All Our Free Online Tools

From cryptography to SEO, file viewers to converters — 100+ tools, always free, no signup required.