Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Miscellaneous > Encoders And Decoders > Vigenère Cipher Tool

Vigenère Cipher Tool

Encrypt and decrypt text with the Vigenère polyalphabetic cipher using a user-supplied keyword that shifts each letter by a varying amount. Live key-alignment stream, tabula recta visualization, Autokey and Beaufort variants, round-trip proof, and Kasiski period hint.

Vigenère Cipher Tool
Quick examples
Letters are shifted by the keyword. Digits, spaces, and punctuation pass through unchanged. Apostrophes and accented characters also pass through.
A short key (3–5 letters) is broken in seconds. 6–12 letters is typical for puzzles. A key as long as the message used only once is a one-time pad.

Embed Vigenère Cipher Tool Widget

About Vigenère Cipher Tool

This Vigenère Cipher Tool encrypts and decrypts text using the polyalphabetic cipher that resisted cryptanalysis for nearly 300 years. Type any message and a keyword, and you instantly get the ciphertext along with a vertically-stacked key-alignment stream that shows plaintext, key, and cipher letter together — so you can see why every letter changed. The tool also exposes the original Autokey variant, the reciprocal Beaufort variant used in the WWII Hagelin M-209, a round-trip proof, and a 26×26 tabula recta for hand verification.

The Step-by-Step Idea

Take the plaintext ATTACKATDAWN and the keyword LEMON. Repeat the keyword underneath until it covers the plaintext, then add the two letters position-by-position (A=0, B=1, …, Z=25), reducing modulo 26.

ALL TEX TMF AOO CNP KLV AEE TMF DOR ANN WLH NER

Reading the green row gives the ciphertext LXFOPVEFRNHR. The key letter L shifts A by 11 positions (A→L), E shifts T by 4 (T→X), and so on. The same plaintext letter A appears three times but encrypts to three different letters (L, O, E) — that is the polyalphabetic property and the reason Vigenère defeats single-letter frequency analysis.

The Math in One Line

Number the alphabet A=0 through Z=25. Let \( p_i \) be the i-th plaintext letter and \( k_i \) be the corresponding key letter (the keyword cycles, so \( k_i = K_{i \bmod n} \) where \( n \) is the key length). Then:

Encrypt: \( c_i = (p_i + k_i) \bmod 26 \)  ·  Decrypt: \( p_i = (c_i - k_i) \bmod 26 \)

For the Beaufort variant the same one-line formula \( c_i = (k_i - p_i) \bmod 26 \) handles both directions. For the Autokey variant the key becomes \( k_1, k_2, \dots, k_n, p_1, p_2, \dots \) — the plaintext itself extends the key once the keyword runs out.

Three Variants Explained

Vigenère (classic)The keyword repeats cyclically. Easy to remember, but the periodicity is exactly what Kasiski (1863) and Friedman (1920) used to break the cipher.Best for: puzzles, CTFs, teaching modular arithmetic and polyalphabetic ciphers.
AutokeyThe key starts with the keyword and is then extended by the plaintext itself, so the key stream never repeats. Vigenère's own 1586 improvement.Best for: showing how a small change defeats Kasiski; still vulnerable to known-plaintext attacks.
BeaufortReciprocal: c = (k − p) mod 26. The same operation encrypts and decrypts. Used in the WWII Hagelin M-209 portable cipher machine.Best for: understanding involutory ciphers; one-button encode/decode.

The Tabula Recta (Vigenère Square)

The classical way to apply Vigenère is to look up each letter in a 26×26 table where row r is the alphabet rotated by r positions. Find the key letter's row, find the plaintext letter's column — the cell at the intersection is the ciphertext letter. To decrypt, find the key row, scan across to the ciphertext letter, then read the column header.

· ABCDEFGHIJKLMNOPQRSTUVWXYZ
A ABCDEFGHIJKLMNOPQRSTUVWXYZ
B BCDEFGHIJKLMNOPQRSTUVWXYZA
C CDEFGHIJKLMNOPQRSTUVWXYZAB
D DEFGHIJKLMNOPQRSTUVWXYZABC
E EFGHIJKLMNOPQRSTUVWXYZABCD
F FGHIJKLMNOPQRSTUVWXYZABCDE
G GHIJKLMNOPQRSTUVWXYZABCDEF
H HIJKLMNOPQRSTUVWXYZABCDEFG
I IJKLMNOPQRSTUVWXYZABCDEFGH
J JKLMNOPQRSTUVWXYZABCDEFGHI
K KLMNOPQRSTUVWXYZABCDEFGHIJ
L LMNOPQRSTUVWXYZABCDEFGHIJK
M MNOPQRSTUVWXYZABCDEFGHIJKL
N NOPQRSTUVWXYZABCDEFGHIJKLM
O OPQRSTUVWXYZABCDEFGHIJKLMN
P PQRSTUVWXYZABCDEFGHIJKLMNO
Q QRSTUVWXYZABCDEFGHIJKLMNOP
R RSTUVWXYZABCDEFGHIJKLMNOPQ
S STUVWXYZABCDEFGHIJKLMNOPQR
T TUVWXYZABCDEFGHIJKLMNOPQRS
U UVWXYZABCDEFGHIJKLMNOPQRST
V VWXYZABCDEFGHIJKLMNOPQRSTU
W WXYZABCDEFGHIJKLMNOPQRSTUV
X XYZABCDEFGHIJKLMNOPQRSTUVW
Y YZABCDEFGHIJKLMNOPQRSTUVWX
Z ZABCDEFGHIJKLMNOPQRSTUVWXY

Row label = key letter. Column header = plaintext letter. Cell content = ciphertext letter. Example: row L, column A → L. Row E, column T → X.

How to Use the Vigenère Cipher Tool

  1. Paste your plaintext (to encrypt) or ciphertext (to decrypt) into the input box. The live key-alignment stream on the right shows plaintext, key letter, and resulting cipher letter stacked vertically, so the per-letter shift is obvious at a glance.
  2. Type a keyword in the Keyword field. Non-letters are stripped automatically. Watch the orange keyword chip cycle as letters are consumed, and the "latest pair" magnifier expand the most recent plain + key = cipher triple.
  3. Pick the Mode (Encrypt or Decrypt) and the Variant (Vigenère, Autokey, or Beaufort). Beaufort is self-inverse, so the mode does not change its output.
  4. Click Apply Vigenère. The full output appears below with a per-letter shift trace, statistics (key length, period, coverage), a round-trip proof, and a side-by-side cipher lab comparing every variant on the same input.
  5. Use the Copy buttons to grab the ciphertext, the original, or the keyword. To decrypt, paste the ciphertext, switch Mode to Decrypt with the same keyword, and click again.

Vigenère vs Caesar vs Atbash vs ROT13 — Quick Reference

CipherTypeKeySelf-inverse"HELLO" with key LEMON
VigenèrePolyalphabetic substitutionKeyword (1+ letters)No (use Decrypt)SIXZB
Caesar (shift 3)Monoalphabetic rotationSingle shiftNoKHOOR
ROT13Rotation (fixed 13)None (fixed)YesURYYB
AtbashReflectionNone (fixed)YesSVOOL
BeaufortPolyalphabetic reciprocalKeywordYesEABDZ

Why Vigenère Was Called "Le Chiffre Indéchiffrable"

For nearly three centuries after Bellaso first published it in 1553, Vigenère was considered uncrackable. A single plaintext letter could encrypt to up to 26 different ciphertext letters depending on its position, so the flat-frequency assumption that breaks Caesar (English E is the most common letter) no longer worked. Charles Babbage broke it in the 1850s but did not publish; Friedrich Kasiski independently published the attack in 1863. The key insight: the keyword repeats, so the same plaintext substring at positions that differ by a multiple of the key length produces the same ciphertext. Find the spacing of repeated trigrams, take the greatest common divisor, and you have a strong candidate for the key length. Once the key length is known, Vigenère decomposes into n parallel Caesar ciphers, each of which falls to frequency analysis.

The Kasiski Examination — How Vigenère Falls

  1. Scan the ciphertext for repeated 3-letter or 4-letter sequences.
  2. Record the distance between every pair of repeats.
  3. Take the greatest common divisor of those distances — the key length almost always divides this GCD.
  4. Split the ciphertext into n columns (every n-th letter). Each column is a Caesar cipher.
  5. For each column, find the letter shift that maximizes the index of coincidence or matches English letter frequencies. That shift is one key letter.

Try the "Kasiski-vulnerable" quick example to see this: the input repeats "The quick brown fox", and the key is only 3 letters, so the same words encrypt the same way both times — a flashing neon sign for a Kasiski analyst.

The Babbage / Kasiski / Friedman Family of Attacks

  • Babbage (1850s, unpublished). Found that repeated patterns betray the key length.
  • Kasiski (1863). Published the same idea: distance between repeats is a multiple of the key length.
  • Friedman (1922). Introduced the Index of Coincidence — a statistical measure that, for the right column split, peaks at ~0.067 (English) instead of the random ~0.038.
  • Modern computers. Run all key lengths from 1 to 30, compute the IC for each column split, pick the length whose split has the highest average IC. Then frequency-attack each column. Total time: milliseconds.

Security Notice

Vigenère is not modern encryption. A 5-letter keyword is broken in milliseconds by Kasiski, and a 20-letter keyword falls to a few seconds of automated analysis. Even Autokey, which removes the periodicity weakness, is vulnerable to known-plaintext attacks and to probable-word attacks on the keyword prefix. Never use Vigenère to protect passwords, personal data, financial information, or anything that should stay confidential. For real protection use AES-256, ChaCha20, RSA, or libsodium. Treat Vigenère as a way to obscure text — for puzzles, CTFs, teaching, and historical demonstrations — not to secure it.

Tips for Best Results

  • To decrypt, paste the ciphertext, type the same keyword, and switch Mode to Decrypt. The same tool both encrypts and decrypts.
  • For the Beaufort variant, the mode does not matter — applying Beaufort twice with the same key returns the original.
  • If you only care about letters (no spaces or punctuation in the output), untick "Preserve original case" — the input is normalized to UPPER before ciphering and the output is uppercase only.
  • Spaces and punctuation in the input pass through unchanged. To hide word boundaries from a casual reader, strip them yourself before pasting.
  • Use the Cipher lab to see how the same key behaves across all three variants — Autokey usually produces output very different from classic Vigenère after the first n letters, because the key stream changes.

FAQ

What is the Vigenère cipher?

The Vigenère cipher is a polyalphabetic substitution cipher that shifts each plaintext letter by a different amount determined by a repeating keyword. If the key letter is K (the 11th letter), the plaintext letter is shifted forward by 10 positions. The cipher was described by Giovan Battista Bellaso in 1553 and later misattributed to Blaise de Vigenère, whose name stuck.

How is Vigenère different from Caesar or Atbash?

Caesar uses a single fixed shift for every letter — a one-letter Vigenère key is exactly Caesar. Vigenère uses a different shift for every position, taken from a repeating keyword — which is why the same plaintext letter can encrypt to several different ciphertext letters. Atbash is a fixed reflection (A↔Z, B↔Y) with no key. Vigenère is much harder to break by single-letter frequency analysis because the key smooths out the letter frequencies.

Is Vigenère secure for real encryption?

No. Friedrich Kasiski cracked Vigenère in 1863 by exploiting the periodicity of the repeating keyword. Modern computers break Vigenère instantly using the Friedman test (index of coincidence) and Kasiski examination. Use AES-256, ChaCha20, or libsodium for real protection; Vigenère is for puzzles, CTFs, and teaching.

What is the Autokey variant?

Autokey extends the keyword by appending the plaintext itself, so the key stream never repeats. Vigenère proposed this in 1586 to defeat the very weakness Kasiski would later exploit. Autokey is much harder to break than classic Vigenère but is still vulnerable to known-plaintext attacks and to probable-word attacks on the keyword prefix.

What is the Beaufort variant?

The Beaufort cipher uses the operation ciphertext = (key − plaintext) mod 26, which makes it its own inverse — encrypting twice with the same key returns the original. It was named after Sir Francis Beaufort and was the cipher behind the Hagelin M-209, a portable mechanical cipher machine used by the US Army in WWII.

How long should my keyword be?

Longer is much better. A one-letter key reduces Vigenère to a Caesar cipher. A short key (3–5 letters) is broken in seconds by Kasiski. A key the same length as the message and used only once is a one-time pad — provably unbreakable. For puzzles and teaching, a keyword of 6–12 letters is the usual choice.

Reference this content, page, or tool as:

"Vigenère Cipher Tool" at https://MiniWebtool.com/vigen-re-cipher-tool/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: 2026-05-26

Related MiniWebtools:

Encoders And Decoders:

Top & Updated:

Random PickerRandom Name PickerInstagram User ID LookupImage ResizerLine CounterFPS ConverterSort NumbersRelative Standard Deviation CalculatorBatting Average CalculatorRemove SpacesMAC Address GeneratorFacebook User ID LookupERA CalculatorWord to Phone Number ConverterMAC Address LookupRandom Quote GeneratorSum CalculatorFeet and Inches to Cm ConverterRandom Truth or Dare GeneratorSun, Moon & Rising Sign Calculator 🌞🌙✨Slope and Grade Calculator⬛ Aspect Ratio Calculator📷 OCR / Image to TextPercent Off CalculatorInvisible Text GeneratorMercury Retrograde CalendarSHA256 Hash GeneratorMerge VideosRandom Superpower GeneratorOPS CalculatorRandom Birthday GeneratorVertical Jump CalculatorNumber of Digits CalculatorAudio SplitterSquare Root (√) CalculatorCm to Feet and Inches ConverterRandom IMEI GeneratorMP3 LooperRandom Credit Card GeneratorLog Base 10 CalculatorRoman Numerals ConverterMaster Number CalculatorRandom Poker Hand GeneratorBitwise CalculatorRandom Fake Address GeneratorFile Size ConverterRandom Activity GeneratorSaturn Return CalculatorYouTube Channel StatisticsOn Base Percentage CalculatorCompound Growth CalculatorHalfway Date CalculatorWord Ladder GeneratorPhone Number ExtractorSalary Conversion CalculatorCaffeine Overdose CalculatorRandom Writing Prompt Generator🖱️ Click CounterAI Text HumanizerRandom Meal GeneratorBattery Life CalculatorImage SplitterSlugging Percentage CalculatorText FormatterOctal CalculatorBinary to Gray Code ConverterNumber to Word ConverterRandom Movie PickerStair CalculatorCompare Two StringsAdd Text to ImageIP Subnet CalculatorWeight Loss CalculatorDecimal to BCD ConverterSun Position Calculator📅 Date CalculatorVideo to Image ExtractorWAR CalculatorBroken Link CheckerPercent Growth Rate CalculatorFirst n Digits of PiProportion CalculatorSHA512 Hash GeneratorVideo CompressorRandom Loadout GeneratorLottery Number GeneratorDay of the Year Calculator - What Day of the Year Is It Today?Word Scramble GeneratorBCD to Decimal ConverterBcrypt Hash Generator / CheckerGray Code to Binary ConverterBreak Line by CharactersConnect the Dots GeneratorRandom Emoji GeneratorTime Duration CalculatorCM to Inches ConverterBingo Card GeneratorYouTube Tag ExtractorWHIP CalculatorEmail ExtractorLeap Years ListAcreage CalculatorLong Division CalculatorAI Punctuation AdderArc Length CalculatorQuotient and Remainder CalculatorLove Compatibility CalculatorList of Prime NumbersMartingale Strategy CalculatorRemove AccentNumber ExtractorSocial Media Username CheckerRemove Leading Trailing SpacesSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾What is my Zodiac Sign?Cone Flat Pattern (Template) Generator🎰 Gacha Pity CalculatorFlip VideoIP Address to Hex ConverterDistance Between Two Points CalculatorLunar Calendar ConverterHebrew Calendar ConverterAPI TesterAI Language DetectorMD5 Hash GeneratorModulo CalculatorRatio to Percentage CalculatorWhat is my Lucky Number?Random Time GeneratorVideo SplitterSourdough CalculatorRandom Group GeneratorDay of Year CalendarURL ExtractorRandom Tournament Bracket GeneratorAstrological Element Balance CalculatorAI ParaphraserImage CompressorRandom Chord GeneratorRandom Object GeneratorColor InverterList RandomizerName RandomizerPER CalculatorBinary to BCD ConverterRemove Lines Containing...Sum of Positive Integers CalculatorPerfect Number Checker🔍 Plagiarism CheckerRatio CalculatorRandom User-Agent GeneratorSort Lines AlphabeticallyRandom Number PickerBolt Torque CalculatorYouTube Comment PickerHeight Percentile CalculatorAdd Prefix and Suffix to TextMolarity Calculator🔊 Tone GeneratorLinear Programming SolverHTML CompressorRemove Audio from Video1099 Tax CalculatorBoiling Point CalculatorRandomize NumbersAmortization CalculatorCollage MakerMiter Angle Calculator⚔️ DPS CalculatorRandom Chess Opening GeneratorCoin FlipperEffect Size CalculatorDMS to Decimal Degrees ConverterPercentile CalculatorAdjust Video SpeedBeer Chill Time CalculatorRandom Math Problem GeneratorMandelbrot Set ExplorerOutlier CalculatorIP Address to Binary ConverterPercent to PPM ConverterArithmetic Sequence CalculatorFraction CalculatorPVIFA CalculatorSteel Weight CalculatorDecibel (dB) CalculatorDestiny Number CalculatorMAC Address AnalyzerRandom Name GeneratorBCD to Binary ConverterRandom PIN GeneratorReverse VideoRMD CalculatorAngel Number CalculatorPartition Function CalculatorTrigonometric Equation SolverTwitter/X Timestamp ConverterSigma Notation Calculator (Summation)Hex to BCD ConverterBCD to Hex ConverterMedian CalculatorStandard Error CalculatorAverage CalculatorHypotenuse CalculatorActual Cash Value CalculatorScientific Notation to Decimal ConverterLog Base 2 CalculatorRoot Mean Square CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterConvolution CalculatorRandom String GeneratorMarkup CalculatorPVIF CalculatorName Number CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorBernoulli Equation CalculatorHeat Transfer CalculatorThermal Expansion CalculatorSpecific Heat Capacity CalculatorGear Ratio Calculator (Mechanical)Pulley System CalculatorHydraulic Cylinder Force CalculatorBelt Length CalculatorCloset Capsule CalculatorStorage Unit Size CalculatorMoving Box Quantity CalculatorGift Card Tip CalculatorGas vs Electric Cost ComparisonPrint Cost CalculatorHair Dye Mixing CalculatorLaundry Detergent Dosage CalculatorDishwasher Load OptimizerTile Grout CalculatorPaint Color Mixing CalculatorFlashcard Spaced Repetition SchedulerLearning Curve CalculatorCornell Notes GeneratorVocabulary Quiz GeneratorLanguage Learning Hours to Fluency CalculatorCollege Cost CalculatorScholarship ROI CalculatorAI Recipe Generator (From Ingredients)AI Gift Idea GeneratorAI Meal Plan GeneratorAI Workout Plan GeneratorAI Reading List GeneratorAI Travel Itinerary GeneratorAI Excuse Generator (Polite)AI Apology Letter WriterAI Unit Converter (Natural Language)AI Resume / CV AnalyzerAI Text Tone AnalyzerAI Data Visualizer (Paste CSV)AI Regex GeneratorAI SQL Query GeneratorPaycheck Calculator (Take-Home Pay)VA Loan CalculatorARM Mortgage CalculatorBiweekly Mortgage Payment CalculatorPMI CalculatorMortgage Points CalculatorBalloon Loan CalculatorInterest-Only Mortgage CalculatorConstruction Loan CalculatorLand Loan CalculatorBoat Loan CalculatorRV Loan CalculatorMotorcycle Loan CalculatorCar Affordability CalculatorOut-the-Door Price CalculatorRent Affordability CalculatorProrated Rent CalculatorRent Increase CalculatorMileage Reimbursement CalculatorPer Diem CalculatorInvoice GeneratorSalary Raise CalculatorSeverance Pay CalculatorHSA Calculator529 College Savings CalculatorI Bond CalculatorT-Bill CalculatorCD Ladder CalculatorCredit Utilization CalculatorLoan Comparison CalculatorGross-Up CalculatorSWP CalculatorRD CalculatorPPF CalculatorEPF CalculatorNPS CalculatorGratuity CalculatorHRA Exemption CalculatorUK Stamp Duty CalculatorZakat CalculatorTithe CalculatorBetting Odds ConverterPayPal Fee CalculatorStripe Fee CalculatorEtsy Fee CalculatoreBay Fee CalculatorAmazon FBA CalculatorShopify Profit CalculatorWholesale Price CalculatorCraft Pricing CalculatorDepreciation CalculatorEOQ CalculatorReorder Point CalculatorSafety Stock CalculatorFIFO / LIFO CalculatorContribution Margin CalculatorWorking Capital CalculatorCost Per Lead CalculatorEmail Marketing ROI CalculatorTip Pooling CalculatorWeek Number CalculatorAnniversary CalculatorHalf Birthday CalculatorSobriety CalculatorRetirement Countdown