araç köşesi

Caesar Cipher Encoder and Decoder with ROT13

Encrypt or decrypt text with the Caesar shift cipher, including ROT13; if the key is unknown, see all 25 shifts at once

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

Type your text in the left box. By default every letter is moved three places forward in the 26-letter Latin alphabet, the shift Julius Caesar is said to have used, and the result appears on the right as you type: A → D, B → E, and X, Y, Z wrap around to A, B, C. The shift is the key; set it with the slider anywhere from 1 to 25. To decode, choose 'Decode (I know the shift)' and use the same number; letters move back by that amount. If you don't know the key, choose 'I don't know the key': the tool writes all 25 possible shifts one under the other, and the line that reads as real words is the answer, with its shift number at the start. For ROT13, set the shift to 13; because 13 is half of 26, encoding and decoding are the same operation. Upper case stays upper case and lower case stays lower; digits, spaces, punctuation and accented letters outside the alphabet are left unchanged and counted in the status line. The Caesar cipher is a puzzle and a teaching tool, not real protection.

This tool is also known as caesar cipher, caesar cipher decoder, rot13 decoder, shift cipher, caesar cipher brute force.

What is Caesar cipher (shift cipher)?

The Caesar cipher is a substitution cipher in which each letter is replaced by the letter a fixed number of positions further along the alphabet. It is named after Julius Caesar, who according to Suetonius used a shift of three in his private and military correspondence. The key is a single number, and there are only as many possible keys as the alphabet has letters minus one. It is one of the oldest and simplest ciphers and is used today for teaching and puzzles.

What is ROT13?

ROT13, short for 'rotate by 13 places', is the Caesar cipher with a shift of 13 in the 26-letter Latin alphabet. Because 13 is exactly half of 26, ROT13 is its own inverse: applying it twice returns the original text. It became popular on Usenet in the 1980s for hiding puzzle answers, spoilers and offensive jokes from a casual glance. It offers no secrecy at all; its only purpose is to stop someone reading the text by accident.

What is the difference between the Caesar cipher and AES encryption?

The Caesar cipher moves every letter by the same number of places; the key is one number and there are only 25 possibilities in the Latin alphabet, so anyone can break it in seconds. AES-256 scrambles the text as blocks of bytes, not letters, with a 256-bit key derived from a password; the number of possible keys is larger than the number of atoms in the observable universe and no known method can find it by trying. Use the Caesar cipher for puzzles, homework and games, and the Encrypt Text with a Password tool, which uses AES, for passwords, private notes and anything confidential.

How the Caesar cipher works

Each letter is replaced by the letter a fixed number of places further along the alphabet. The Roman historian Suetonius records that Julius Caesar shifted his military letters by three: A became D, B became E. At the end of the alphabet you wrap around to the start, so X, Y and Z become A, B and C.

Decoding moves each letter back by the same amount. The alphabet matters: a message shifted within the 29-letter Turkish alphabet or the 27-letter Spanish alphabet (with Ñ) gives a different result from the same shift in the 26-letter Latin alphabet, so both sides must agree on it.

Why it is not secure

There are only 25 useful keys in the Latin alphabet. That is nothing for a computer; the 'show every shift' option on this page tries all of them in a fraction of a second. Even without trying keys, letter frequency gives it away: in English text the most common letter is e, so the most common letter in the ciphertext is probably e shifted.

Use the Caesar cipher for homework, puzzles, escape rooms, geocaching and for learning what encryption means. For anything that must really stay private, use the Encrypt Text with a Password tool, which applies AES-256.

Frequently asked questions

How do I decode ROT13?

Choose the Latin alphabet (26 letters) and set the shift to 13. Encoding and decoding are the same in ROT13, so it does not matter whether you pick Encode or Decode.

How do I crack a Caesar cipher without the key?

Choose 'I don't know the key — show every shift'. Each line starts with its shift number; the line that reads as real words gives you the key. If none does, the message may use another alphabet or another cipher.

What happens to numbers and accented letters?

They are left unchanged. Only letters of the chosen alphabet shift; the status line counts letters that are outside it, such as é or ü in the Latin alphabet.

Is my text sent anywhere?

No. Everything runs in your browser; the text never leaves this page.