Caesar Cipher

Encode and decode Caesar cipher text with any shift from 0 to 25, plus a brute-force table of all 25 possible decodings.

Direction

Type something to see the result.

Brute force — all 25 shifts

Every possible decoding of your text. Pick the row that reads like English, then press it to apply that key.

    No uploads. Your files stay on your device.

    Free forever, no sign-up, no cookies. Buy me a coffee

    How it works

    The Caesar cipher (named after Julius Caesar, who reportedly used a shift of 3) replaces every letter with the letter a fixed number of places further down the alphabet, wrapping from Z back to A. Formally, each letter is mapped with E(x) = (x + n) mod 26 when encoding and D(x) = (x − n) mod 26 when decoding, where x is the letter's position (A = 0) and n is the shift. With a shift of 3, HELLO becomes KHOOR; a shift of 13 is the special case known as ROT13, which is its own inverse. Letter case is preserved and spaces, punctuation and (by default) digits pass through untouched.

    Because there are only 25 useful keys, the cipher is trivially broken by trying them all — which is exactly what the brute-force table does. It is a puzzle toy, not security: it can be broken by hand in seconds and offers no real protection, so never use it for passwords or private data. Treat it as a puzzle, escape-room or classroom tool, never as encryption. All the shifting happens in JavaScript on your device: no text is uploaded, logged or stored.

    Frequently asked questions

    How does the Caesar cipher work?

    Every letter moves a fixed number of places along the alphabet and wraps from Z back to A. Encoding uses E(x) = (x + n) mod 26 and decoding uses D(x) = (x − n) mod 26, where x is the letter's position with A = 0 and n is the shift. Julius Caesar reportedly used n = 3, so HELLO becomes KHOOR. Case is preserved and spaces, punctuation and digits pass through unchanged unless you switch on digit shifting.

    How do you decode a Caesar cipher without knowing the key?

    Brute force it. There are only 25 useful keys, so you can simply try them all and read the one that makes sense. Paste the ciphertext into this tool and the table at the bottom of the page shows all 25 decodings at once — press the row that reads like real language and the shift is applied to your text.

    Is the Caesar cipher secure, and does my text leave my device?

    It is not secure at all — with 25 keys it can be broken by hand in seconds, so treat it as a puzzle, escape-room or classroom toy rather than encryption. Your text is still private here: all the shifting happens in JavaScript in your browser, so nothing is uploaded, logged or stored. ROT13, the special case where the shift is 13, is its own inverse.

    Report a bug