[{"data":1,"prerenderedAt":726},["ShallowReactive",2],{"guide-caesar-cipher-variations-explained":3},{"id":4,"title":5,"body":6,"date":718,"description":719,"extension":720,"meta":721,"navigation":295,"path":722,"readingTime":280,"seo":723,"stem":724,"__hash__":725},"guides\u002Fguides\u002Fcaesar-cipher-variations-explained.md","Caesar Cipher Variations Explained",{"type":7,"value":8,"toc":699},"minimark",[9,14,18,21,25,137,140,145,213,217,220,230,233,303,307,310,365,368,372,448,452,455,461,464,524,528,531,535,595,598,602,605,609,612,628,631,635,658,662,683,687,695],[10,11,13],"h2",{"id":12},"the-caesar-cipher-family","The Caesar Cipher Family",[15,16,17],"p",{},"The Caesar cipher shifts every letter by a fixed number of positions in the alphabet. Julius Caesar reportedly used a shift of 3 — A became D, B became E. Modern variations use different shifts, creating the full family of 25 possible rotations.",[15,19,20],{},"ROT13 is the most famous member because it is self-inverse: encoding and decoding are the same operation. But every shift from 1 to 25 is a valid Caesar cipher with different properties.",[10,22,24],{"id":23},"all-25-rotations","All 25 Rotations",[26,27,28,50],"table",{},[29,30,31],"thead",{},[32,33,34,38,41,44,47],"tr",{},[35,36,37],"th",{},"Name",[35,39,40],{},"Shift",[35,42,43],{},"A→",[35,45,46],{},"Z→",[35,48,49],{},"Self-inverse?",[51,52,53,71,86,101,121],"tbody",{},[32,54,55,59,62,65,68],{},[56,57,58],"td",{},"ROT1",[56,60,61],{},"1",[56,63,64],{},"B",[56,66,67],{},"A",[56,69,70],{},"No",[32,72,73,76,79,82,84],{},[56,74,75],{},"ROT2",[56,77,78],{},"2",[56,80,81],{},"C",[56,83,64],{},[56,85,70],{},[32,87,88,91,94,97,99],{},[56,89,90],{},"ROT3",[56,92,93],{},"3",[56,95,96],{},"D",[56,98,81],{},[56,100,70],{},[32,102,103,106,109,112,115],{},[56,104,105],{},"ROT13",[56,107,108],{},"13",[56,110,111],{},"N",[56,113,114],{},"M",[56,116,117],{},[118,119,120],"strong",{},"Yes",[32,122,123,126,129,132,135],{},[56,124,125],{},"ROT25",[56,127,128],{},"25",[56,130,131],{},"Z",[56,133,134],{},"Y",[56,136,70],{},[15,138,139],{},"Only ROT13 is self-inverse. Every other rotation requires a separate decode step — shift forward to encode, shift backward to decode. That is why ROT13 dominates in practical use.",[141,142,144],"h3",{"id":143},"quick-reference-for-common-shifts","Quick reference for common shifts",[26,146,147,163],{},[29,148,149],{},[32,150,151,153,160],{},[35,152,40],{},[35,154,155,159],{},[156,157,158],"code",{},"hello"," becomes",[35,161,162],{},"Common name",[51,164,165,177,189,201],{},[32,166,167,169,174],{},[56,168,58],{},[56,170,171],{},[156,172,173],{},"ifmmp",[56,175,176],{},"—",[32,178,179,181,186],{},[56,180,90],{},[56,182,183],{},[156,184,185],{},"khoor",[56,187,188],{},"Classic Caesar",[32,190,191,193,198],{},[56,192,105],{},[56,194,195],{},[156,196,197],{},"uryyb",[56,199,200],{},"Self-inverse",[32,202,203,205,210],{},[56,204,125],{},[56,206,207],{},[156,208,209],{},"gdkkn",[56,211,212],{},"Reverse ROT1",[10,214,216],{"id":215},"rot5-digits-only","ROT5: Digits Only",[15,218,219],{},"ROT5 applies the same rotation logic to the digits 0–9 instead of letters. Each digit shifts by 5 positions.",[221,222,227],"pre",{"className":223,"code":225,"language":226},[224],"language-text","0 1 2 3 4\n↕ ↕ ↕ ↕ ↕\n5 6 7 8 9\n","text",[156,228,225],{"__ignoreMap":229},"",[15,231,232],{},"Like ROT13, ROT5 is self-inverse: 5 + 5 = 10 wraps back around. Combining ROT13 on letters and ROT5 on digits produces ROT18 — a cipher that shifts both characters and numbers.",[221,234,238],{"className":235,"code":236,"language":237,"meta":229,"style":229},"language-python shiki shiki-themes github-light github-dark","def rot5(text):\n    result = []\n    for char in text:\n        if '0' \u003C= char \u003C= '9':\n            result.append(chr((ord(char) - ord('0') + 5) % 10 + ord('0')))\n        else:\n            result.append(char)\n    return ''.join(result)\n\nrot5('Code 42')  # 'Code 97'\n","python",[156,239,240,248,254,260,266,272,278,284,290,297],{"__ignoreMap":229},[241,242,245],"span",{"class":243,"line":244},"line",1,[241,246,247],{},"def rot5(text):\n",[241,249,251],{"class":243,"line":250},2,[241,252,253],{},"    result = []\n",[241,255,257],{"class":243,"line":256},3,[241,258,259],{},"    for char in text:\n",[241,261,263],{"class":243,"line":262},4,[241,264,265],{},"        if '0' \u003C= char \u003C= '9':\n",[241,267,269],{"class":243,"line":268},5,[241,270,271],{},"            result.append(chr((ord(char) - ord('0') + 5) % 10 + ord('0')))\n",[241,273,275],{"class":243,"line":274},6,[241,276,277],{},"        else:\n",[241,279,281],{"class":243,"line":280},7,[241,282,283],{},"            result.append(char)\n",[241,285,287],{"class":243,"line":286},8,[241,288,289],{},"    return ''.join(result)\n",[241,291,293],{"class":243,"line":292},9,[241,294,296],{"emptyLinePlaceholder":295},true,"\n",[241,298,300],{"class":243,"line":299},10,[241,301,302],{},"rot5('Code 42')  # 'Code 97'\n",[10,304,306],{"id":305},"rot47-full-ascii-range","ROT47: Full ASCII Range",[15,308,309],{},"ROT47 shifts printable ASCII characters (codes 33–126) by 47 positions. It covers letters, digits, punctuation, and symbols — making it more versatile than ROT13 for obscuring technical content.",[221,311,313],{"className":235,"code":312,"language":237,"meta":229,"style":229},"def rot47(text):\n    result = []\n    for char in text:\n        code = ord(char)\n        if 33 \u003C= code \u003C= 126:\n            result.append(chr(33 + (code - 33 + 47) % 94))\n        else:\n            result.append(char)\n    return ''.join(result)\n\nrot47('Hello World!')  # 'w6==@ (@C=5P'\n",[156,314,315,320,324,328,333,338,343,347,351,355,359],{"__ignoreMap":229},[241,316,317],{"class":243,"line":244},[241,318,319],{},"def rot47(text):\n",[241,321,322],{"class":243,"line":250},[241,323,253],{},[241,325,326],{"class":243,"line":256},[241,327,259],{},[241,329,330],{"class":243,"line":262},[241,331,332],{},"        code = ord(char)\n",[241,334,335],{"class":243,"line":268},[241,336,337],{},"        if 33 \u003C= code \u003C= 126:\n",[241,339,340],{"class":243,"line":274},[241,341,342],{},"            result.append(chr(33 + (code - 33 + 47) % 94))\n",[241,344,345],{"class":243,"line":280},[241,346,277],{},[241,348,349],{"class":243,"line":286},[241,350,283],{},[241,352,353],{"class":243,"line":292},[241,354,289],{},[241,356,357],{"class":243,"line":299},[241,358,296],{"emptyLinePlaceholder":295},[241,360,362],{"class":243,"line":361},11,[241,363,364],{},"rot47('Hello World!')  # 'w6==@ (@C=5P'\n",[15,366,367],{},"ROT47 is also self-inverse: 47 + 47 = 94, which equals the full range of printable ASCII characters, wrapping back to the start.",[141,369,371],{"id":370},"rot13-vs-rot47-comparison","ROT13 vs ROT47 comparison",[26,373,374,386],{},[29,375,376],{},[32,377,378,381,383],{},[35,379,380],{},"Property",[35,382,105],{},[35,384,385],{},"ROT47",[51,387,388,399,407,417,427,437],{},[32,389,390,393,396],{},[56,391,392],{},"Character set",[56,394,395],{},"A–Z, a–z",[56,397,398],{},"ASCII 33–126",[32,400,401,403,405],{},[56,402,200],{},[56,404,120],{},[56,406,120],{},[32,408,409,412,414],{},[56,410,411],{},"Preserves spaces",[56,413,120],{},[56,415,416],{},"No — spaces shift too",[32,418,419,422,424],{},[56,420,421],{},"Preserves punctuation",[56,423,120],{},[56,425,426],{},"No — all symbols shift",[32,428,429,432,435],{},[56,430,431],{},"Security",[56,433,434],{},"None",[56,436,434],{},[32,438,439,442,445],{},[56,440,441],{},"Common use",[56,443,444],{},"Spoilers, puzzles",[56,446,447],{},"Obfuscating strings in code",[10,449,451],{"id":450},"atbash-cipher-alphabet-reversal","Atbash Cipher: Alphabet Reversal",[15,453,454],{},"The Atbash cipher maps each letter to its mirror position in the alphabet — A↔Z, B↔Y, C↔X, and so on.",[221,456,459],{"className":457,"code":458,"language":226},[224],"A B C D E F G H I J K L M\n↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕\nZ Y X W V U T S R Q P O N\n",[156,460,458],{"__ignoreMap":229},[15,462,463],{},"Atbash is also self-inverse and is sometimes grouped with Caesar variations, though it is technically a substitution cipher with a fixed mapping rather than a rotation.",[221,465,467],{"className":235,"code":466,"language":237,"meta":229,"style":229},"def atbash(text):\n    result = []\n    for char in text:\n        if 'a' \u003C= char \u003C= 'z':\n            result.append(chr(ord('z') - (ord(char) - ord('a'))))\n        elif 'A' \u003C= char \u003C= 'Z':\n            result.append(chr(ord('Z') - (ord(char) - ord('A'))))\n        else:\n            result.append(char)\n    return ''.join(result)\n\natbash('Hello')  # 'Svool'\n",[156,468,469,474,478,482,487,492,497,502,506,510,514,518],{"__ignoreMap":229},[241,470,471],{"class":243,"line":244},[241,472,473],{},"def atbash(text):\n",[241,475,476],{"class":243,"line":250},[241,477,253],{},[241,479,480],{"class":243,"line":256},[241,481,259],{},[241,483,484],{"class":243,"line":262},[241,485,486],{},"        if 'a' \u003C= char \u003C= 'z':\n",[241,488,489],{"class":243,"line":268},[241,490,491],{},"            result.append(chr(ord('z') - (ord(char) - ord('a'))))\n",[241,493,494],{"class":243,"line":274},[241,495,496],{},"        elif 'A' \u003C= char \u003C= 'Z':\n",[241,498,499],{"class":243,"line":280},[241,500,501],{},"            result.append(chr(ord('Z') - (ord(char) - ord('A'))))\n",[241,503,504],{"class":243,"line":286},[241,505,277],{},[241,507,508],{"class":243,"line":292},[241,509,283],{},[241,511,512],{"class":243,"line":299},[241,513,289],{},[241,515,516],{"class":243,"line":361},[241,517,296],{"emptyLinePlaceholder":295},[241,519,521],{"class":243,"line":520},12,[241,522,523],{},"atbash('Hello')  # 'Svool'\n",[10,525,527],{"id":526},"decoding-unknown-shifts","Decoding Unknown Shifts",[15,529,530],{},"When you encounter a Caesar cipher but do not know the shift, two approaches work:",[141,532,534],{"id":533},"brute-force-all-25-rotations","Brute-force all 25 rotations",[221,536,538],{"className":235,"code":537,"language":237,"meta":229,"style":229},"def caesar_brute(text):\n    for shift in range(1, 26):\n        decoded = []\n        for char in text:\n            if 'a' \u003C= char \u003C= 'z':\n                decoded.append(chr((ord(char) - ord('a') - shift) % 26 + ord('a')))\n            elif 'A' \u003C= char \u003C= 'Z':\n                decoded.append(chr((ord(char) - ord('A') - shift) % 26 + ord('A')))\n            else:\n                decoded.append(char)\n        print(f\"ROT{shift}: {''.join(decoded)}\")\n",[156,539,540,545,550,555,560,565,570,575,580,585,590],{"__ignoreMap":229},[241,541,542],{"class":243,"line":244},[241,543,544],{},"def caesar_brute(text):\n",[241,546,547],{"class":243,"line":250},[241,548,549],{},"    for shift in range(1, 26):\n",[241,551,552],{"class":243,"line":256},[241,553,554],{},"        decoded = []\n",[241,556,557],{"class":243,"line":262},[241,558,559],{},"        for char in text:\n",[241,561,562],{"class":243,"line":268},[241,563,564],{},"            if 'a' \u003C= char \u003C= 'z':\n",[241,566,567],{"class":243,"line":274},[241,568,569],{},"                decoded.append(chr((ord(char) - ord('a') - shift) % 26 + ord('a')))\n",[241,571,572],{"class":243,"line":280},[241,573,574],{},"            elif 'A' \u003C= char \u003C= 'Z':\n",[241,576,577],{"class":243,"line":286},[241,578,579],{},"                decoded.append(chr((ord(char) - ord('A') - shift) % 26 + ord('A')))\n",[241,581,582],{"class":243,"line":292},[241,583,584],{},"            else:\n",[241,586,587],{"class":243,"line":299},[241,588,589],{},"                decoded.append(char)\n",[241,591,592],{"class":243,"line":361},[241,593,594],{},"        print(f\"ROT{shift}: {''.join(decoded)}\")\n",[15,596,597],{},"Scan the output for readable English — the correct shift reveals itself immediately.",[141,599,601],{"id":600},"frequency-analysis","Frequency analysis",[15,603,604],{},"Count letter frequencies in the ciphertext and match them to known English letter frequencies. The most common ciphertext letter likely maps to E (the most common letter in English). This approach works faster on long texts where brute-force output is tedious to scan.",[10,606,608],{"id":607},"none-of-these-provide-security","None of These Provide Security",[15,610,611],{},"Every variation discussed here is a toy cipher. They are fun for puzzles and educational for understanding substitution, but they offer zero protection against anyone who wants to read the content:",[613,614,615,619,622,625],"ul",{},[616,617,618],"li",{},"Only 25 possible Caesar shifts — trivially brute-forced",[616,620,621],{},"No secret key — the algorithm is the entire system",[616,623,624],{},"Frequency analysis breaks them in seconds",[616,626,627],{},"Modern computers decode any variant instantly",[15,629,630],{},"Use these for puzzles, spoilers, and obfuscation. Never for protecting sensitive data.",[10,632,634],{"id":633},"key-takeaways","Key Takeaways",[613,636,637,640,643,646,649,652,655],{},[616,638,639],{},"The Caesar cipher family includes 25 rotations (ROT1–ROT25), all trivially breakable",[616,641,642],{},"Only ROT13 is self-inverse — the others need a separate decode step",[616,644,645],{},"ROT5 shifts digits 0–9 by 5; ROT13 + ROT5 = ROT18",[616,647,648],{},"ROT47 shifts the full printable ASCII range and is also self-inverse",[616,650,651],{},"Atbash mirrors the alphabet (A↔Z) and is self-inverse",[616,653,654],{},"Brute-forcing all 25 rotations is the fastest decode method for unknown shifts",[616,656,657],{},"None of these ciphers provide any real security — they are for puzzles and obfuscation only",[10,659,661],{"id":660},"related-guides","Related Guides",[613,663,664,671,677],{},[616,665,666],{},[667,668,670],"a",{"href":669},"\u002Fguides\u002Frot13-explained","ROT13 Explained",[616,672,673],{},[667,674,676],{"href":675},"\u002Fguides\u002Frot13-programming-puzzles","ROT13 in Programming Puzzles",[616,678,679],{},[667,680,682],{"href":681},"\u002Fguides\u002Ftext-encoding-methods","Text Encoding Methods",[10,684,686],{"id":685},"try-it-yourself","Try It Yourself",[15,688,689,690,694],{},"Encode and decode any Caesar rotation instantly with our free ",[667,691,693],{"href":692},"\u002Ftools\u002Frot13","ROT13 Tool",". Paste text, choose your shift, and see the result in real time — no installation needed.",[696,697,698],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":229,"searchDepth":250,"depth":250,"links":700},[701,702,705,706,709,710,714,715,716,717],{"id":12,"depth":250,"text":13},{"id":23,"depth":250,"text":24,"children":703},[704],{"id":143,"depth":256,"text":144},{"id":215,"depth":250,"text":216},{"id":305,"depth":250,"text":306,"children":707},[708],{"id":370,"depth":256,"text":371},{"id":450,"depth":250,"text":451},{"id":526,"depth":250,"text":527,"children":711},[712,713],{"id":533,"depth":256,"text":534},{"id":600,"depth":256,"text":601},{"id":607,"depth":250,"text":608},{"id":633,"depth":250,"text":634},{"id":660,"depth":250,"text":661},{"id":685,"depth":250,"text":686},"2026-05-28","From ROT1 to ROT25 and beyond — Caesar cipher shifts, ROT47, ROT5, and how each variation works with examples and decoding methods.","md",{"immutable":295},"\u002Fguides\u002Fcaesar-cipher-variations-explained",{"title":5,"description":719},"guides\u002Fcaesar-cipher-variations-explained","K9gc1_RrvituuJTvUZqf4taRpJAw2XrtBFGblOEfm14",1780401332014]