encoding_decoding_caesar
Encode or decode text using the classical Caesar shift cipher, rotating each letter by a fixed number of positions (1-25) through the alphabet.
Instructions
Caesar Cipher (Encode / Decode). Encode or decode text with the classical Caesar shift cipher: each A-Z letter is rotated a fixed number of positions (1-25) through the alphabet, decode applying the inverse rotation. This is a monoalphabetic substitution cipher with no real cryptographic strength — identical letters always map identically and frequency patterns survive, so use it for puzzles, CTFs, and learning, not to protect secrets. Use encoding_decoding_rot13 for the fixed ROT13/ROT47 variant (shift 13), or encoding_decoding_vigenere when you need a keyword-driven polyalphabetic shift instead of one fixed value. Out-of-range or non-integer shifts are rejected; preserve_case and preserve_non_alpha control whether original casing and non-letter characters are kept. Runs locally on the input you provide: read-only, non-destructive, contacts no external service, and is rate-limited. Returns the transformed text, a human-readable info string, and a letter-frequency analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to transform. Only A-Z/a-z letters are shifted; other characters are passed through or dropped per preserve_non_alpha. | |
| operation | Yes | Whether to encode (shift forward) or decode (shift backward by the same amount). | |
| shift | Yes | Number of alphabet positions to rotate each letter. Must be an integer 1-25; shift 13 equals ROT13 (encode and decode are identical). | |
| preserve_case | No | Keep each letter's original upper/lower case. When false, encoded output is upper-cased and decoded output lower-cased. | |
| preserve_non_alpha | No | Keep numbers, spaces, and punctuation in the output. When false, all non-letter characters are removed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the transform succeeded. | |
| input | No | The input text, echoed back. | |
| operation | No | The operation performed (encode or decode). | |
| shift | No | The shift value applied (1-25). | |
| preserve_case | No | Whether original letter case was preserved. | |
| preserve_non_alpha | No | Whether non-letter characters were preserved. | |
| result | No | The transformed (encoded or decoded) text. | |
| info | No | Human-readable summary of the shift, e.g. noting when shift 13 equals ROT13. | |
| analysis | No | Letter-frequency analysis of the input text. |