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 LookupFPS ConverterLine CounterRelative Standard Deviation CalculatorSort NumbersBatting Average CalculatorMAC Address GeneratorImage ResizerRemove SpacesERA CalculatorFacebook User ID LookupWord to Phone Number ConverterFeet and Inches to Cm ConverterRandom Truth or Dare GeneratorMAC Address LookupSun, Moon & Rising Sign Calculator 🌞🌙✨Sum CalculatorSlope and Grade CalculatorMP3 LooperPercent Off CalculatorBitwise CalculatorAudio SplitterRandom Credit Card GeneratorInvisible Text GeneratorRoman Numerals ConverterNumber of Digits CalculatorWord Ladder GeneratorAI Text HumanizerRandom IMEI GeneratorSHA256 Hash GeneratorLog Base 10 CalculatorRandom Superpower Generator📷 OCR / Image to TextRandom Quote GeneratorOPS CalculatorMaster Number CalculatorSquare Root (√) CalculatorCm to Feet and Inches ConverterMerge VideosHalfway Date CalculatorOn Base Percentage CalculatorVertical Jump CalculatorPhone Number Extractor⬛ Aspect Ratio CalculatorRandom Activity GeneratorRandom Birthday GeneratorSlugging Percentage CalculatorWAR CalculatorRandom Fake Address GeneratorSalary Conversion CalculatorSaturn Return CalculatorFile Size ConverterRandom Poker Hand GeneratorRandom Meal GeneratorText FormatterRandom Movie PickerLeap Years ListBinary to Gray Code ConverterCompound Growth CalculatorCaffeine Overdose CalculatorName Number CalculatorRandom Writing Prompt GeneratorRandom Loadout GeneratorNumber to Word ConverterOctal CalculatorCompare Two StringsStair Calculator📅 Date CalculatorLove Compatibility CalculatorVideo to Image ExtractorDecimal to BCD ConverterBattery Life CalculatorCM to Inches ConverterIP Subnet CalculatorBCD to Decimal ConverterAdd Prefix and Suffix to TextFirst n Digits of PiYouTube Channel StatisticsPER CalculatorBingo Card GeneratorAdd Text to ImageQuotient and Remainder CalculatorConnect the Dots Generator🖱️ Click CounterMercury Retrograde CalendarImage SplitterArc Length CalculatorWhat is my Lucky Number?Image CompressorSHA512 Hash GeneratorPercent Growth Rate CalculatorRemove AccentDay of the Year Calculator - What Day of the Year Is It Today?URL ExtractorWeight Loss CalculatorAcreage CalculatorGray Code to Binary ConverterList of Prime NumbersOutlier CalculatorVideo CompressorRandom Object GeneratorAstrological Element Balance Calculator🎰 Gacha Pity CalculatorTime Duration CalculatorSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾What is my Zodiac Sign?Remove Leading Trailing SpacesIP Address to Hex ConverterAngel Number CalculatorBinary to BCD ConverterFlip VideoMartingale Strategy CalculatorWHIP CalculatorLottery Number GeneratorRandom Time GeneratorAI Language DetectorNumber ExtractorBreak Line by CharactersRandom Line PickerSum of Positive Integers CalculatorMorse Code GeneratorPVIF CalculatorRandom User-Agent GeneratorProportion CalculatorVideo SplitterAI Punctuation AdderP/E Ratio CalculatorHeight Percentile CalculatorLife Path Number CalculatorDestiny Number CalculatorFraction CalculatorRandom Chord GeneratorDay of Year CalendarBonus CalculatorList RandomizerPVIFA CalculatorCone Flat Pattern (Template) GeneratorModulo CalculatorBcrypt Hash Generator / CheckerRandom Number PickerAdjust Video SpeedCollage MakerRandom Emoji GeneratorPercent to PPM ConverterAntilog CalculatorLong Division CalculatorColor InverterHypotenuse CalculatorFirst n Digits of eEmail ExtractorRandom Chess Opening GeneratorLongest Day of the YearRatio to Percentage CalculatorAI ParaphraserExponential Decay CalculatorYouTube Tag ExtractorLunar Calendar ConverterMandelbrot Set ExplorerMultiple Fraction CalculatorRandom Group GeneratorShort Selling Profit CalculatorTrigonometric Equation SolverSquare Numbers List🎮 Game Sensitivity ConverterSteel Weight CalculatorWord Scramble GeneratorBoxing Punch Power Calculator🔍 Plagiarism CheckerMultiplication CalculatorNumber RandomizerHebrew Calendar ConverterLog (Logarithm) CalculatorMAC Address AnalyzerName RandomizerTaco Bar CalculatorRandomize NumbersBoiling Point CalculatorMiter Angle CalculatorSocial Media Username CheckerCrossword Puzzle MakerDMS to Decimal Degrees ConverterDue Date CalculatorPercentile CalculatorRemove Line BreaksDecking CalculatorRock Paper Scissors GeneratorGrade CalculatorReverse VideoStandard Error CalculatorJob FinderCoin FlipperCatalan Number GeneratorNonogram Generator (Picross)Field Goal Percentage CalculatorRandom Excuse GeneratorImage EnhancerSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorAverage CalculatorRemove Audio from VideoActual 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 GeneratorAmortization CalculatorMarkup CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube 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 CalculatorROT13 Encoder/DecoderAtbash Cipher ToolVigenère Cipher ToolPronunciation IPA ConverterHemingway-Style Readability EditorSentence Length Variance AnalyzerWord Frequency AnalyzerBusiness Days CalculatorAdd Business Days to DateDate Pattern GeneratorHow Long Until CalculatorHow Long Ago CalculatorBirthday Across Cultures CalculatorHijri Calendar ConverterInsulin Sensitivity Factor CalculatorCarb-to-Insulin Ratio CalculatorLean Body Mass to Strength CalculatorOne-Mile Walk Test (Rockport) CalculatorCooper 12-Minute Run CalculatorFFMI CalculatorAPGAR Score CalculatorGlasgow Coma Scale CalculatorWells Score Calculator (DVT/PE)Tennis Score TrackerSoccer xG (Expected Goals) CalculatorCricket Run Rate CalculatorRugby Points CalculatorRace Time PredictorSwimming SWOLF CalculatorYoga Pose Hold TimerFishing Knot Strength CalculatorBike Gear Ratio CalculatorClimbing Grade ConverterWine Pairing SuggesterStandard Drink CalculatorCaffeine Half-Life TrackerSpice Substitution FinderDietary Restriction Recipe FilterMarinade Time CalculatorFermentation Time CalculatorSmoking Wood Pairing GuideFreelance Project Pricing CalculatorSaaS Pricing CalculatorSubscription Cost TrackerSide Hustle ROI CalculatorRemote Work Savings CalculatorCoffee Habit Cost CalculatorGym vs Home Workout Cost CalculatorLunch Cost CalculatorWealth Growth Visualizer1031 Exchange CalculatorRental Yield CalculatorCash-on-Cash Return CalculatorBRRRR Method CalculatorSection 8 Rent CalculatorRoommate Rent SplitterAirbnb Pricing OptimizerStatute of Limitations CalculatorSentence Reduction CalculatorSales Tax Nexus CheckerPatent Filing Fee CalculatorTrademark Class FinderWill Asset Distribution CalculatorWorkers' Compensation CalculatorStopping Distance CalculatorTrip Cost SplitterVehicle Weight Distribution CalculatorTrailer Tongue Weight CalculatorTire Tread Wear CalculatorEngine Compression Ratio CalculatorHeadlight Beam Distance CalculatorCat Litter Box CalculatorAquarium Heater Wattage CalculatorBird Cage Size CalculatorReptile Habitat UVB CalculatorPet Travel Crate Size FinderHorse Hay CalculatorCrochet Hook Size ConverterKnitting Needle Size ConverterKnitting Pattern CalculatorCross-Stitch Floss CalculatorQuilt Binding CalculatorOrigami Paper Size CalculatorPottery Clay Shrinkage CalculatorBeading Pattern CalculatorResin Casting Volume CalculatorEmbroidery Thread Length CalculatorHiking Pace Calculator (Naismith's Rule)Backpacking Food Weight CalculatorTent Footprint Size CalculatorSleeping Bag Temperature Rating GuideKnot Tying Reference ToolStar Visibility CalculatorTide Time CalculatorSun Position CalculatorReynolds Number CalculatorBernoulli Equation CalculatorHeat Transfer CalculatorThermal Expansion CalculatorSpecific Heat Capacity CalculatorGear Ratio Calculator (Mechanical)Pulley System Calculator