Caesar Cipher

The Caesar cipher tool encodes and decodes text with a shift cipher, the substitution Julius Caesar used, where each letter moves a fixed number of places along the alphabet. Pick a shift from 1 to 25 or use ROT13. If you have a message and don't know the shift, the tool lists all 25 decodings and highlights the one that looks most like English. It runs in your browser with nothing uploaded.

Examples

TextShiftResult
abc3def
xyz3abc
Hello13 (ROT13)Uryyb
Attack at dawn5Fyyfhp fy ifbs

When to use it

  1. Solve a cipher in a puzzle, escape room or geocache.
  2. Teach how substitution ciphers work and why they're weak.
  3. Decode ROT13 text in forums.
  4. Crack a CTF warm-up challenge.

How to Use

  1. Enter your text.
  2. Choose Encode or Decode and set the shift, or click ROT13.
  3. Copy the result.
  4. To crack an unknown shift, read the highlighted line in the list of all 25 shifts.

Features

  1. Shift 1–25 and ROT13
  2. Encode and decode
  3. All 25 shifts listed
  4. Automatic best guess using English letter frequencies
  5. Keeps case and punctuation
  6. 100% client-side

FAQs

How do I decode a Caesar cipher without the key?

Paste the text and look at the 'All 25 shifts' list. The likeliest English answer is highlighted.

What is ROT13?

A Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying it twice gives back the original.

Are numbers and punctuation shifted?

No. Only the letters A–Z change; everything else is kept, and so is upper and lower case.

Is a Caesar cipher secure?

No. There are only 25 possible keys, so anyone can try them all in seconds.

Is my text uploaded?

No. Everything runs in your browser.

Technical Details

A Caesar cipher replaces each letter with the one a fixed number of places further along the alphabet, wrapping from Z back to A. Encoding with shift n moves each letter n places forward; decoding moves it n places back, computed modulo 26 so any shift, including negative or larger than 26, wraps correctly. Upper and lower case are kept and only the 26 Latin letters change — digits, punctuation, spaces and accented letters pass through. ROT13 is shift 13, which is its own inverse. To crack an unknown shift the tool decodes with all 25 possible shifts and scores each candidate with a chi-squared test against standard English letter frequencies (e about 12.7%, t 9.1%, a 8.2% and so on); the candidate whose letter counts are closest to English is highlighted. That works well for a sentence or more of English and less reliably for a few letters or other languages, which is why every shift is still shown.

Text Utilities

Text Utilities

  • ROT13 / ROT47
  • NATO Phonetic Alphabet
  • Palindrome Checker
  • Text Repeater
  • Bionic Reading Converter
  • Number to Words
  • Reading Time Estimator
  • Remove Line Breaks