Related tools
Frequently asked questions
Is this cipher secure?
No. Classical ciphers like this one can be broken by hand or by computer in seconds. Use them for puzzles, escape rooms, teaching and fun – for real secrets use Text Encryption (AES-256).
What happens to spaces, numbers and punctuation?
They are left as they are, and upper and lower case are kept, so the result keeps the shape of your message.
Does it work with other alphabets?
It works on the 26 letters A–Z. Accented and non-Latin letters are passed through unchanged.
How does the affine cipher work?
Each letter is turned into a number (A = 0 … Z = 25), multiplied by a, shifted by b and reduced modulo 26: E(x) = (ax + b) mod 26.
Why can a only be some numbers?
To decrypt, a needs an inverse modulo 26, which exists only when a shares no factor with 26. That leaves 12 values: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23 and 25.
How is it decrypted?
With D(y) = a⁻¹(y − b) mod 26, where a⁻¹ is the modular inverse – for example the inverse of 5 is 21, because 5 × 21 = 105 = 4 × 26 + 1.
How many keys are there?
12 values of a times 26 values of b = 312 keys, so the whole key space can be searched instantly.
How does “Try all 312 keys” choose the answer?
It decrypts with every key and ranks the results by how closely the letter frequencies match English. The best 15 are listed.
Is the Caesar cipher an affine cipher?
Yes – it is the case a = 1. Atbash is also affine, with a = 25 and b = 25.
Can I see the full substitution?
Yes – the plain and cipher alphabets for your key are shown under the result, with the inverse used for decryption.
Is it free?
Yes – no sign-up, no limits and no watermark.
Is anything I type uploaded?
No. It runs entirely in your browser; nothing you enter is sent to Docelora or anyone else.
Does it work on a phone?
Yes – the page adapts to small screens and touch input.
Do I need to install anything?
No – it works in any modern browser on Windows, macOS, Linux, Android, iPhone and iPad.
Which browsers are supported?
Current versions of Chrome, Edge, Firefox and Safari.
Does it work offline?
Once the page has loaded, the work happens on your device without a connection.
Can I copy or download the result?
Yes – use the copy and download buttons under the result.
Can I use it for school or work?
Yes – it is free for personal, educational and commercial use.
Why is it free?
Docelora is supported by advertising and never sells your data.
How do I report a problem?
Use the Contact page and include your browser and an example input.
Last reviewed: 16 November 2026.