Caesar cipher encoder & decoder — custom shift, encrypt and decrypt online

Use this free online Caesar cipher tool to encrypt or decrypt text with any integer shift (applied modulo 26 on Latin letters). It is a classic substitution cipher often introduced in cryptography courses, escape rooms, and CTF warm-ups: each A–Z and a–z character moves forward for encrypt or backward for decrypt; numbers, punctuation, spaces, and non-ASCII letters stay untouched so you can mix prose with codes. Processing runs entirely in your browser—paste a message, upload a .txt file, adjust the shift with the numeric field or slider, then use the copy control on the output. For comparing two versions of the same passage after different shifts, open our text diff checker. When you need word counts for write-ups or keys, use the word counter.

Direction

Effective letter shift: 3

Output

Only basic Latin A–Z and a–z are shifted; everything else is preserved. This is an educational Caesar cipher encoder/decoder—not a substitute for modern encryption.

What is a Caesar cipher (and when to use this page)

Named after Julius Caesar, who reportedly used a shift of three on military dispatches, the Caesar shift cipher maps the alphabet to itself by a fixed rotation. A Caesar cipher decoder reverses that rotation. Because there are only 25 non-trivial shifts, anyone can break the code by brute force or frequency analysis on English text. Treat this utility as a learning aid, puzzle helper, or toy obfuscator—not as confidentiality for passwords, API tokens, or personal data. For structured payloads after you transform strings, validate syntax with the JSON formatter & validator.

Educators use a Caesar cipher encoder to demonstrate modular arithmetic and the limits of simple substitution. Developers sometimes show the same idea when explaining hashing versus encryption: shifting letters is reversible and keyspace-tiny; real systems use algorithms designed to resist known attacks. If you are normalizing identifiers or headings rather than enciphering, the text case converter is the better fit.

How to use this Caesar cipher tool (step by step)

  1. Paste plaintext or ciphertext into the input, or click Upload .txt to load UTF-8 plain text. Try Load sample for a short mixed-case example with punctuation and digits.
  2. Under Direction, choose Encrypt to shift letters forward or Decrypt to shift backward by the same magnitude.
  3. Set the Shift to any integer; the tool applies it modulo 26 to Latin letters. The label shows the effective letter shift (0–25). You can fine-tune with the range slider or type values like 29 (equivalent to shift 3).
  4. Read the output textarea and click the copy icon to place the result on the clipboard. If the browser blocks clipboard access, select the text and use Ctrl+C or Cmd+C.
  5. To verify round-trips, encrypt with shift k, copy the ciphertext back into input, switch to Decrypt with the same k, and confirm you recover the original (aside from characters that were never shifted).

Keywords and search intents this guide covers

Readers look for a Caesar cipher online, Caesar shift decoder, ROT13 vs Caesar differences, or a quick way to encode a secret message for a classroom demo. This page supports those intents with client-side transforms, clear encrypt/decrypt modes, and explanations of modulo-26 behavior. Teachers comparing ciphertext lengths or line counts can pair this tool with the duplicate line remover when cleaning word lists for exercises.

ROT13, Affine ciphers, and what this tool does not do

ROT13 is a fixed Caesar shift of 13: applying it twice returns the original text. Our catalog also lists a dedicated ROT13 encoder & decoder route for that special case. An affine cipher multiplies and adds modulo 26; this page only performs pure shifts. We do not remove diacritics, transliterate scripts, or implement Vigenère—those require different rulesets. For URL-safe strings after you derive tokens, consider the URL tools in the site catalog rather than chaining multiple classical ciphers.

Privacy, limits, and responsible use

The Caesar cipher calculator runs locally in your tab: no ciphertext upload is required for the transform itself. Extremely large pasted buffers may make the browser sluggish; for multi-megabyte logs, use a desktop script. Never rely on Caesar for passwords, HIPAA, or financial data—use vetted cryptography libraries and key management instead.

Related text & string tools

Browse the full Text & String Tools section on the home page for the growing catalog. Highlights from the same family:

  • Word CounterCount words, characters, sentences, paragraphs, and estimated reading time for articles and limits.
  • Text Case ConverterSwitch between uppercase, lowercase, title, camelCase, snake_case, and kebab-case in one pass.
  • Text Diff CheckerCompare two text versions with line-level highlights for copy, legal, and content workflows.
  • Duplicate Line RemoverDeduplicate pasted lists with case-sensitive or insensitive matching for clean datasets.
  • Text ReverserReverse full text, words per line, or each line—quick puzzles, tests, and obfuscation demos.
  • Find & Replace ToolFind and replace plain text or regex patterns across long documents without an editor install.
  • Slug GeneratorTurn titles into URL-safe, lowercase, hyphenated slugs for blogs, products, and routes.
  • Line SorterSort lines A–Z, Z–A, by length, or randomly to tidy logs, lists, and imports.
  • Whitespace RemoverTrim edges and normalize spaces so pasted content fits forms, CSVs, and code blocks.
  • Text to Binary ConverterEncode text to binary strings or decode binary back to readable characters for learning and demos.
  • ROT13 Encoder & DecoderApply ROT13 encode/decode in the browser for quick CTF-style or legacy text tasks.
  • Word Frequency AnalyzerRank word counts in pasted text to spot repetition, SEO stuffing, or vocabulary patterns.
  • Email ExtractorPull every valid email from messy text or HTML into a deduplicated list for outreach prep.
  • URL ExtractorExtract URLs from blobs of text or HTML for audits, archiving, and link inventories.

Frequently asked questions

What is a Caesar cipher?
The Caesar cipher is one of the oldest substitution ciphers: each letter in the Latin alphabet is shifted forward or backward by a fixed number of positions (the key). Spaces, numbers, punctuation, and non-Latin characters are usually left unchanged. It is easy to break by frequency analysis, so it is useful for learning, puzzles, and lightweight obfuscation—not for real secrecy.
How do I encrypt and decrypt with this tool?
Choose Encrypt to shift letters forward by your shift value, or Decrypt to shift them backward by the same value. Enter a shift from 0 through 25 (values wrap modulo 26). Decrypting with shift N is the same as encrypting with shift 26 minus N.
Is my message sent to a server?
No. The transformation runs entirely in your browser. Paste text or upload a local plain-text file; nothing is transmitted for encoding unless you use another page that explicitly performs network requests.
Does the Caesar cipher change uppercase and lowercase differently?
This tool preserves case: uppercase letters stay in A–Z and lowercase in a–z, each shifted within its own alphabet. Accented letters and letters outside basic Latin are left as-is so you can see what would need normalization in a stricter implementation.
What shift should I use?
Any integer works; the effective shift is taken modulo 26. Shift 0 leaves text unchanged. Historically, Caesar is often described with shift 3. For CTF-style challenges, try small shifts first or compare with a known word.
How is this different from ROT13?
ROT13 is a fixed Caesar shift of 13 on letters; encrypting twice returns the original text. A general Caesar cipher lets you pick any shift 0–25. When the ROT13 encoder page is available in this site’s Text and String Tools, you can use it for that special case.
Can I process a whole .txt file?
Yes. Use Upload .txt to load UTF-8 plain text, set shift and mode, then copy the result. Very large files may slow the tab; for huge logs, prefer a local script or editor.
Is the Caesar cipher secure?
No. With only 25 non-trivial shifts, brute force is trivial. Frequency analysis breaks it quickly on natural language. Use modern encryption (for example AES via established libraries) when you need confidentiality.
Which related tools work well with cipher demos?
Use the text diff checker to compare ciphertext versions, the word counter if you are writing explanations or keys, and the duplicate line remover when cleaning word lists before testing shifts. The JSON formatter helps when your payload is structured data.