Caesar Cipher

A classic way to encode and decode text – shift each letter by a chosen number of places.

Caesar Cipher Encoder & Decoder

This tool shifts every letter of your text by a number you choose – forward to encrypt, backward to decrypt.
Type or paste your text in the "Input" field, set the shift & mode, and the result appears in the "Output" field – live as you type.


Load an example

1. Cipher mode
2. Shift amount
A number from 0 to 25. 13 = ROT13.
3. Output options
Keeps uppercase and lowercase; off shifts everything to uppercase.
Off removes everything that is not a letter.
Ready to encrypt or decrypt text.


Overview

The Caesar Cipher is one of history's simplest and best-known text encryption techniques. This free tool lets you apply it instantly: every letter of your text is moved a fixed number of places forward or backward in the alphabet, turning a readable message into an encoded one – or turning encoded text back into plain. All of it runs in your browser, so your text never leaves your device.

It works on any language that uses the standard A–Z alphabet. Numbers, spaces, and punctuation are left untouched by default, casing is preserved, and because there are only 25 meaningful shifts, you can even experiment with each one to decode a mystery message.


How to Use

1. Enter your text: Type or paste it into the Input textarea, click "Load an example", or upload a plain .txt file.

2. Choose Encrypt or Decrypt: Pick the cipher mode for the direction you want the letters to shift.

3. Set the shift: Choose a number between 0 and 25. Encrypting with a shift then Decrypting with the same shift returns your original text.

4. Read your result: The Output textarea updates automatically in Live mode, or press "Convert" to run it manually.

5. Save it: Use the Copy or Download icons to keep the result.


Features & Options

Encrypt / Decrypt: Encrypt shifts letters forward through the alphabet; Decrypt shifts them backward. For example, with a shift of 3, encrypting HELLO gives KHOOR; decrypting KHOOR restores HELLO.

Shift amount: Any whole number from 0 to 25. A shift of 0 leaves text unchanged, and 13 is ROT13 – a special case where encrypting and decrypting are the same thing.

Preserve case: On by default, so Hello with a shift of 3 becomes Khoor. Turn it off to shift everything to uppercase instead.

Keep spaces, digits & symbols: On by default, meaning only letters are shifted and everything else stays exactly as it was. Turn it off to strip punctuation and numbers from the output entirely.

Live mode: When on (the default), the Output updates as you type or change any option. Turn it off to convert only when you press the button.

Convert / Clear: "Convert" runs the shift manually; "Clear Everything" resets the fields and options.

Copy / Download: Copy the encoded or decoded text to your clipboard, or save it as a .txt file.


Examples

Press a "Try it" button to load that example – it fills the Input and sets the right mode and shift automatically.

Input (Encrypt)
HELLO WORLD
Output (shift 3)
KHOOR ZRUOG
Input (Decrypt)
KHOOR ZRUOG
Output (shift 3)
HELLO WORLD
Input
the quick brown fox
Output (Encrypt, shift 5)
ymj vznhp gwtbs ktc
Input
Meet me at noon, then we hide!
Output (Encrypt, shift 7)
Tlla tl ha uvvu, aolu dl opkl!
Input
attacking at dawn!
Output (ROT13)
nggnpxvat ng qnja!
Input
Gur jnl gb uvqr vf gb qrpbqr.
Output (ROT13)
The way to hide is to decode.

FAQs

FAQ 1: What is the Caesar cipher?
Answer: It is a substitution cipher that shifts each letter by a fixed number of places in the alphabet. With a shift of 3, A becomes D, B becomes E, and so on, wrapping around past Z. Only letters change; everything else stays the same.

FAQ 2: How do I decrypt a message I received?
Answer: Choose "Decrypt (shift backward)" and enter the same shift that was used to encrypt. Decrypting with shift N is the exact reverse of encrypting with shift N, so your original text comes back.

FAQ 3: What makes shift 13 (ROT13) special?
Answer: At a shift of 13, encrypting and decrypting are the same operation because the alphabet is split exactly in half. Applying ROT13 twice always returns the original text, so it needs no separate mode.

FAQ 4: Why is "Preserve case" on by default?
Answer: Preserving case keeps the output readable – uppercase letters stay uppercase and lowercase letters stay lowercase, matching the shape of your input. Turning it off shifts all letters to uppercase instead.

FAQ 5: Are numbers and punctuation encoded too?
Answer: By default no – only letters shift. Spaces, digits, and symbols are copied through unchanged because they are not part of the A–Z alphabet. Turn off "Keep spaces, digits & symbols" to remove them from the output.

FAQ 6: Is my text private?
Answer: Yes. The tool runs entirely in your browser with JavaScript. Your text is never uploaded to or stored on our servers.

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.