Atbash Cipher Calculator
Use the options below to encode or decode mirrored alphabet text. The tool works instantly because Atbash uses one reversible substitution rule.
Formula Used
Atbash mirrors the alphabet from both ends. Each letter maps to the letter equally far from the opposite side.
Mapped index: y = 25 - x
Uppercase rule: chr(ord('Z') - (ord(c) - ord('A')))
Lowercase rule: chr(ord('z') - (ord(c) - ord('a')))
Because the rule is self-inverse, encoding and decoding use the same substitution. Applying Atbash twice returns the original text.
How to Use This Calculator
- Enter the text you want to transform.
- Select encode or decode. Both use the same rule.
- Choose case handling and decide whether to keep spaces, punctuation, and numbers.
- Enable grouping if you want compact study blocks such as five-character groups.
- Press Submit to show the result below the header and above the form.
- Use the CSV or PDF buttons to export the current result.
Example Data Table
| Input Text | Atbash Output | Notes |
|---|---|---|
| HELLO WORLD | SVOOL DLIOW | Classic uppercase example with spaces preserved. |
| abcxyz | zyxcba | Lowercase letters mirror from both alphabet ends. |
| Secret 123 | Hvxivg 123 | Letters change, numbers remain unchanged. |
| Math-Tool | Nzgs-Gllo | Punctuation stays when symbol preservation is enabled. |
| OpenAI | LkvmZR | Case preservation keeps original uppercase letters. |
FAQs
1. What does the Atbash cipher do?
It replaces each letter with its alphabet opposite. A becomes Z, B becomes Y, and the pattern continues inward until the whole text is transformed.
2. Is encoding different from decoding in Atbash?
No. Atbash is self-inverse. The same mirrored substitution rule both hides and restores text, so one tool handles both directions perfectly.
3. Why is this listed under maths?
Atbash follows a simple positional mapping rule. Each alphabet index x becomes 25 minus x, which makes the cipher a neat reversible transformation.
4. What happens to numbers and punctuation?
They can stay unchanged or be removed from the output, depending on the options you choose. This makes the tool useful for both study and formatting.
5. When should I use grouped output?
Grouped output is helpful for puzzles, worksheets, and manual checking. It compacts transformed letters into fixed blocks that are easier to scan.
6. Does the tool support uppercase and lowercase letters?
Yes. You can preserve the original letter case or force the result into full uppercase or lowercase for cleaner presentation.
7. Why show a mapping preview table?
The mapping preview helps learners inspect each character change, including positions and ASCII values. It is useful for debugging, study, and teaching.
8. Can I export the result for reports or classwork?
Yes. The page includes CSV and PDF export buttons so you can save the transformed text, metrics, and summary details outside the browser.