Skip to content
MyToolkit.pro

Encoding

Caesar cipher (ROT13)

Encode or decode text with a Caesar cipher — each letter is rotated forward through the alphabet by a fixed amount. A shift of 13 is ROT13, its own inverse. Digits, spaces and punctuation are left as they are.

Private by design: no text is uploaded or stored.

Private by design: no text is uploaded or stored.

Direction
13

The range follows the alphabet: 0–25 for Latin, 0–34 for Polish. In the Latin alphabet 13 is ROT13, which decodes itself. To decode, choose Decode and the same shift.

Try an example

Result

Updates when you run the tool.

Letters shifted
0

All shifts

How the cipher works

Each letter of the chosen alphabet is moved forward by the shift, wrapping from the last letter back to the first, while case is preserved and all other characters pass through untouched. The Latin alphabet has 26 letters (A–Z); the Polish one has 35 (A–Z plus ą ć ę ł ń ó ś ź ż), so Polish letters are shifted too instead of giving the text away. It is a classic learning cipher, not real encryption — with so few possible shifts anyone can break it. To reverse a shift, choose Decode with the same shift (or run ROT13 again in the Latin alphabet).

How to encode or decode a Caesar cipher message

  1. Paste or type your message into Text to shift. You can also load a .txt file with the Load from file button or drop a file onto the box. The output updates as you type, so you don't have to press the Encode / decode button.
  2. Under Direction, choose Encode to hide a message or Decode to reverse one.
  3. Move the Shift (0–25) slider to the key you were given. It starts at 13 (ROT13), and the number next to the slider shows the current shift.
  4. Read the result in the Output box. You can copy it with Copy result or save it as a file with Download result.
  5. If you don't know the key, look through the All 26 shifts list below the output and click the line that reads as plain language. The slider jumps to that shift.

The Letters shifted counter shows how many A–Z and a–z letters were rotated. Every other character is copied to the output unchanged.

Worked examples

Input Direction Shift Output
Hello, World! Encode 13 Uryyb, Jbeyq!
Uryyb, Jbeyq! Encode 13 Hello, World!
The quick brown fox Encode 3 Wkh txlfn eurzq ira
Wkh txlfn eurzq ira Decode 3 The quick brown fox
Attack at dawn Encode 1 Buubdl bu ebxo

The first two rows show that with ROT13 you don't need to think about direction: running the same setting again restores the text. For any other key, set the direction to match what the sender did. If they encoded with 3, you decode with 3.

Sometimes a puzzle gives the key as a letter instead of a number. Count from A = 0, so B = 1, D = 3, N = 13 and Z = 25, then set the slider to that number.

Here is how cracking an unknown key with the shift list looks when Direction is set to Decode:

Input: Khoor  (direction: Decode)
 0: Khoor
 1: Jgnnq
 2: Ifmmp
 3: Hello   <- readable, so the key is 3
 ...
25: Lipps

In Decode mode the row number is the key. If Direction is set to Encode, the same readable line shows up as row 23 instead.

Where a Caesar shift or ROT13 is actually used

  • Puzzle hunts, escape rooms and geocaching: clues are often shifted by a small amount such as 1 or 3, and the key comes as a separate hint. Decode with that key, or scan the shift list if you don't have one.
  • Hiding spoilers and punchlines: forums and newsgroups have used ROT13 for decades so that nobody reads an answer by accident. Paste the block in and the plain text appears immediately.
  • Teaching cryptography: brute force is easy to demonstrate when every possible key fits on one screen. Students can encode a sentence, swap outputs and break each other's messages with the shift list.
  • CTF warm-ups: beginner capture-the-flag tasks often hide a flag behind ROT13 or another rotation. If none of the 26 rows is readable, the text is probably a different encoding. Try Base64 Encoder / Decoder or Binary to text next.

For the cipher's history and how to crack it by letter frequency, see How to Break a Caesar Cipher: Letter Frequencies, Not Guesswork.

What the tool shifts and what it leaves alone

  • Only the 26 basic Latin letters are rotated. For example, Zoë paid 50€ at 9:30 with shift 13 becomes Mbë cnvq 50€ ng 9:30. The ë, the euro sign and the time stay the same.
  • To shift accented letters as well, run the text through Remove accents first. The accents are lost permanently, so decoding gives you plain letters back (Zoe, not Zoë).
  • Uppercase letters stay uppercase, lowercase letters stay lowercase, and Z wraps around to A.
  • Shift 0 leaves the input unchanged. The slider stops at 25 because a shift of 26 is the same as 0.
  • Keyword ciphers aren't supported. If the ciphertext uses a different shift for each letter (a Vigenère cipher, for example), none of the 26 rows will be readable.
  • You can type or paste up to 1,000,000 characters, and Load from file accepts text files up to 2 MB. Everything runs in your browser tab, so very long texts can make the shift list slow to redraw.

Frequently asked questions

What shift did Julius Caesar use?

According to Suetonius, Caesar shifted each letter three places forward, so A became D. Set the slider to 3 to reproduce it.

What is the difference between ROT13 and ROT47?

ROT13 rotates only the letters A–Z and leaves digits and symbols alone. ROT47 rotates all 94 printable ASCII characters, including digits and punctuation. This tool does ROT13 and other letter shifts only, so it won't decode ROT47 text.

What are ROT1 and ROT3?

They are Caesar shifts of 1 and 3: with ROT1, A becomes B, and with ROT3, A becomes D. Set the slider to 1 or 3 to use them.

How is a Caesar cipher different from a Vigenère cipher?

A Caesar cipher moves every letter by the same amount. A Vigenère cipher uses a keyword, so the shift changes from one letter to the next. That's why trying all 26 shifts doesn't break a Vigenère message.

All in Code & Data

Morse Code Translator

Translate text to Morse code and back in your browser. Choose the direction, get instant output with correct word spacing. Nothing is uploaded.

Code & Data In your browser

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 to text instantly in your browser.

Code & Data In your browser

URL Encoder / Decoder

Percent-encode or decode URL text instantly and privately in your browser.

Code & Data In your browser

HTML Entity Encoder

Encode text to HTML entities or decode entities back to text in your browser. Escape <, >, &, quotes safely, or reverse named, decimal and hex entities. Nothing is uploaded.

Code & Data In your browser

Text to Binary

Convert text to binary and binary back to text in your browser. Pick the direction, get clean space-separated bytes. Nothing is uploaded.

Code & Data In your browser

Binary to text

Decode binary back into readable text. Enter 8-bit groups separated by spaces and get the original characters, decoded as UTF-8 so it round-trips with the text-to-binary tool. Runs in your browser.

Code & Data In your browser

What do you need?

Swipe up for the next one