Caesar Cipher & ROT13

Encode and decode Caesar cipher, ROT13 and Atbash, or crack an unknown shift.

0 words · 0 charactersNot uploaded

Classical ciphers

  • Caesar shift: each letter moves a fixed number of places along the alphabet. Julius Caesar reportedly used a shift of 3 (A → D). Numbers, spaces and punctuation are left as they are; case is preserved.
  • ROT13: a Caesar shift of 13. Because the alphabet has 26 letters, applying it twice gives back the original (it’s been used online for decades to hide spoilers and puzzle answers).
  • ROT47: rotates all printable ASCII characters (! to ~) by 47, scrambling digits and punctuation too.
  • Atbash: reverses the alphabet (A ↔ Z, B ↔ Y), an ancient Hebrew cipher.

Cracking an unknown shift

A Caesar cipher has only 25 possible keys, so it can always be broken. Crack a Caesar cipher tries all 25 shifts and ranks the results by how closely their letter frequencies match English (using a chi-squared test). The best candidate is starred at the top (for a sentence or more of English it’s almost always right).

None of these ciphers provide any real security. They’re for puzzles, teaching and fun; use proper encryption for anything private.

Worked example

Here is what the Caesar Cipher & ROT13 returns for its built-in example. Settings used: Cipher: Caesar shift; Decode (shift backwards): off. Click Try an example in the tool above to load it, then change it as you like.

Input
Meet me at the old library at noon.
Output
Phhw ph dw wkh rog oleudub dw qrrq.

Related tools: Letter Frequency Counter, Morse Code Translator.

Questions

How do I decode a Caesar cipher without the key?

Choose “Crack a Caesar cipher”. All 25 shifts are tried and ranked by English letter frequency, best match first.

Is ROT13 encryption?

No. It is a fixed letter substitution that anyone can reverse; it only hides text from a casual glance.

Last reviewed · How Textkiln tools work