ROT-N (Caesar) Cipher

Generalised Caesar shift — any rotation from -25 to +25.

Open tool

Overview

ROT-N is the generalized Caesar cipher: shift every letter forward by N positions in the alphabet, wrapping around at Z. ROT-13 is the famous case (used to lightly obscure spoilers on old forums), but the tool supports any shift from −25 to +25, plus a quick "try every shift" mode for cracking unknown ciphertext.

Cryptography learners, CTF players, puzzle hunters, and anyone making lightweight spoiler tags reach for ROT-N. It's the first cipher most people meet and the simplest non-trivial example of a substitution cipher.

How it works

The Caesar cipher dates back at least to Julius Caesar, who used a left shift of 3 in his private correspondence. To encrypt, replace each letter X with the letter N positions later in the alphabet, modulo 26. To decrypt, shift by −N (or equivalently +26−N). ROT-13 is special because shifting twice by 13 returns the original, so encoding and decoding are the same operation.

Worked example: encoding "HELLO" with ROT-3 — H (7) shifts to K (10), E (4) shifts to H (7), L (11) shifts to O (14), O (14) shifts to R (17) — yielding "KHOOR". Decoding subtracts 3 to recover "HELLO".

Examples

Input:  HELLO
Shift:  3
Output: KHOOR
Input:  Hello, World!
Shift:  13
Output: Uryyb, Jbeyq!
Input:  URYYB JBEYQ
Shift:  13 (decoding)
Output: HELLO WORLD

FAQ

Why is ROT-13 special?

A 26-letter alphabet rotated by 13 is its own inverse: apply ROT-13 twice and you're back to the original. That's why it became the standard for obscuring forum posts.

Is ROT-N secure?

No. Only 25 shifts produce different output, so brute force is trivial. Use it for puzzles, not for actual secrets.

What about digits and case?

The tool preserves case (uppercase stays uppercase) and leaves digits, spaces, and punctuation unchanged. Some variants extend ROT-N to digits (ROT-5 on numbers) — toggle that option if you want it.

Try ROT-N (Caesar) Cipher

An unhandled error has occurred. Reload ×