Skip to main content

Beaufort Cipher Encoder and Decoder

C = (key − text) mod 26, reciprocal — one keyword both encrypts and decrypts — browser-only

  • Runs locally
  • Category Encoding & Crypto
  • Best for Checking small payloads, tokens, hashes, and encoded values quickly.
Beaufort cipher. Each letter becomes (keyword letter − text letter) mod 26, A=0 … Z=25. It is reciprocal: the same keyword run over the output gives back the input, so one button both encrypts and decrypts. Case is kept; digits, spaces, punctuation and non-Latin text pass through and do not consume the keyword. Classic: ATTACKATDAWN + LEMON → LLTOLBETLNPR.

Enter a keyword to start — letters only, case ignored.

Input0 chars
Output0 chars
Encrypted / decrypted text appears here.

What this tool does

Free Beaufort cipher encoder and decoder for CTF challenges, puzzle hunts and classical-cryptography lessons. The Beaufort cipher transforms each Latin letter with the rule C = (K − P) mod 26, where P is the plaintext letter position (A=0 to Z=25) and K is the position of the current letter of a repeating keyword. Its defining property is that it is reciprocal, meaning it is its own inverse: run the same keyword over the output and you get the input back, so a single operation both encrypts and decrypts with no separate decode mode. Type or paste text, set a keyword, and the result updates as you type. Only A to Z and a to z change, case is kept, and digits, spaces, punctuation and CJK characters pass through without consuming the keyword, so alignment never drifts on mixed text. An optional alignment view shows letter by letter how each input character lined up against its keyword character. Everything runs in your browser with one-click copy and a shareable URL that reopens the same message at the same keyword. 100% client-side, no upload, no tracking.

Tool details

Input
Text
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Encoding & Crypto · Student
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Beaufort Cipher fits into your work

Use it for quick browser-side encoding, decoding, hashing, token checks, and share-safe transformations.

Encoding jobs

  • Checking small payloads, tokens, hashes, and encoded values quickly.
  • Preparing values for APIs, URLs, docs, or support tickets.
  • Avoiding account-based tools when the input might be sensitive.

Encoding checks

  • Do not paste live secrets unless you are comfortable with local browser handling.
  • Confirm whether the operation is reversible before sharing the result.
  • For hashes, compare the exact algorithm and casing expected by the receiver.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 ROT13 Encoder & Decoder ROT13 / ROT47 / Caesar cipher — encode and decode in your browser, instant. Open
  2. 2 Atbash Cipher Mirror the alphabet, A↔Z B↔Y, no key, self-reciprocal so the same button encodes and decodes, browser-only Open
  3. 3 Vigenère Cipher Encoder / Decoder Encrypt and decrypt with a keyword, polyalphabetic shift, case kept, non-letters passed through, browser-only Open

Real-world use cases

  • Solve a Beaufort step in a CTF challenge

    A crypto challenge hands you a block of uppercase letters and a hint that the key is a flag-related word. Paste the ciphertext, type the candidate keyword, and read the result instantly. Because Beaufort is reciprocal, you do not have to guess whether you are encoding or decoding, the same pass handles both. When the output suddenly reads like English, you have the keyword and the next flag fragment.

  • Teach reciprocal ciphers in a classroom

    Explaining why C = (K − P) mod 26 is self-inverse lands better when students watch it happen. Encrypt ATTACKATDAWN with LEMON, show the LLTOLBETLNPR output, then paste that back with the same keyword and watch the original reappear. The alignment view lets the class trace each letter against its keyword letter, so the subtraction rule stops being abstract and becomes something they can follow by hand.

  • Build or check a puzzle-hunt clue

    Designing a treasure hunt where one clue must decode to the next? Beaufort is ideal because solvers apply the same operation in both directions, so the instructions stay simple. Draft the hidden message, encrypt it under a keyword tied to the location, and verify the ciphertext round-trips cleanly back to your clue before you print it on the card.

  • Compare Beaufort against Vigenère on the same input

    You are studying polyalphabetic ciphers and want to feel the difference between addition and subtraction keys. Run the same plaintext and keyword here and in a Vigenère tool, line up LLTOLBETLNPR against LXFOPVEFRNHR, and the effect of the sign flip is obvious. Sharing the URL lets a study partner reopen the exact same message and keyword to confirm what they are seeing.

Common pitfalls

  • Confusing Beaufort with Vigenère. Vigenère uses P + K and needs a decode direction, Beaufort uses K − P and is reciprocal. Feeding a Vigenère ciphertext into a Beaufort decoder, or vice versa, produces garbage even with the correct keyword. Confirm which cipher the puzzle actually used before blaming the keyword.

  • Mixing up Beaufort with the variant Beaufort. The variant (sometimes called German Beaufort) uses P − K instead of K − P, so it is the inverse direction and is not reciprocal. If your output looks shifted by a consistent amount, you may be on the wrong subtraction order. This tool implements the classic K − P form.

  • Assuming non-letters consume the keyword. Spaces, digits and punctuation pass through and do not advance the keyword pointer here. If you expected them to shift the key, your hand-worked answer will disagree with the tool. Strip the message to letters first if a particular challenge defines alignment differently.

Privacy

The entire cipher runs as plain JavaScript inside your browser tab. Your text, your keyword and the result never leave the page and nothing is logged. The one caveat: the shareable URL encodes your text and keyword in the query string, so a "share link" pasted into chat will record them in the recipient server's access log. For anything you would rather not expose, use the copy button and paste the text instead of sharing the URL, and remember that Beaufort is not real encryption either way.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-05-29