On-device AI — professional-grade, fully private.

ROT13 and Caesar Cipher Tool

Encode, decode, or find the key you were never given.

  • Nothing uploaded · runs on your device
  • ROT13, Caesar, ROT5, ROT18, ROT47, Atbash
  • Finds the key when you don't know it
  • Your own alphabet, including Cyrillic and Greek

Drop a text file here

One file at a time on Free, up to 25 MB. .txt, .md, .csv, .json, .srt, .vtt, .log and more.

0 characters

Cipher settingsEverything updates the result as you change it.
Quick start
Cipher
Cipher

A fixed 13-place letter shift. The same operation encodes and decodes.

Reference

See exactly what each character becomes before you trust it with a document.

Free: 25.0 MB per file, 1 at a time.

What the text rotator does

A rotation cipher replaces every character in an alphabet with the one a fixed number of places along it, wrapping around at the end. That single idea covers every cipher on this page: ROT13 is a rotation of thirteen over the letters, ROT5 a rotation of five over the digits, ROT47 a rotation of forty-seven over printable ASCII, and Atbash the same alphabet read backwards. Because the rule is mechanical, the result is exactly as long as the input and every character outside the alphabet survives untouched.

What that means in practice

  • Nothing is uploaded — the text is transformed inside the page, so it never reaches a server and the tool keeps working offline once loaded.
  • Length never changes — a 4,000-character message comes back as 4,000 characters, which makes it safe to rotate structured text like subtitles or CSV without breaking the layout.
  • Case is preserved — capitals map to capitals and lowercase to lowercase, so the shape of the text is still readable after rotating.
  • You can see the mapping — the letter chart shows exactly what each character becomes before you apply it to anything that matters.
  • It tells you how much it changed — a count of changed characters is the fastest way to notice that a cipher is pointed at the wrong alphabet.

Every cipher, and when to reach for it

Six ready-made ciphers and one you define yourself. Five of the six are self-inverse, which means running them a second time returns the original and there is no direction to get wrong. Only Caesar and a custom alphabet need you to say whether you are encoding or decoding.

CipherWhat it rotatesUse it for
ROT1326 letters, shift 13Spoilers, forum posts, puzzle hints. The classic, and its own inverse.
Caesar26 letters, shift 1-25Teaching, puzzles, and anything where the key matters.
ROT510 digits, shift 5Obscuring numbers while leaving words readable.
ROT18letters and digitsText with both, such as a code or a reference number in a sentence.
ROT4794 printable ASCII, shift 47Capture-the-flag challenges and anywhere punctuation should change too.
Atbash26 letters, mirroredA rotation's older cousin: A to Z, B to Y. No key at all.
Customyour alphabetCyrillic, Greek, the 23-letter Latin alphabet, or a set you invent.

ROT47 is the one that surprises people. Because its alphabet includes punctuation, the output stops looking like words at all — that is normal, and running ROT47 again turns it straight back into readable text.

Encoding and decoding are not the same operation

This is the single most common mistake with a Caesar cipher, and it is worth stating plainly: shifting forward by three does not undo shifting forward by three. It produces a shift of six. To decode a message that was encoded with a shift of three, you shift back by three — which is the same as shifting forward by twenty-three.

Why ROT13 makes it confusing

ROT13 is the exception that teaches the wrong lesson. Thirteen is exactly half of twenty-six, so shifting forward thirteen and shifting back thirteen land on the same letter, and applying ROT13 twice really does return the original. Every other shift behaves differently, so a tool that only ever adds the shift will look correct on ROT13 and quietly produce nonsense everywhere else. That is why the Direction switch appears for Caesar and custom alphabets and is hidden for the five self-inverse ciphers — a control that cannot change the output should not be on screen.

The Swap button

Swap puts the result back in the input box and flips the direction at the same time, so pressing it twice returns you to where you started. Moving the output back into the input without inverting the direction would apply the shift a second time, which is a different message, not the original one.

Decoding when you do not know the key

There are only twenty-five non-zero Caesar keys, so the answer is always somewhere in a list of twenty-five. The work is not generating that list — it is reading it. This tool ranks it for you.

How the ranking works

Letters are not evenly distributed in real language. In English, E is about eight times more common than K and a hundred times more common than Q, and every language has its own fingerprint — German leans hard on E and N, Indonesian on A and K, French on E more than any of them. A rotation shuffles that fingerprint but does not change its shape, so counting the letters once is enough to score all twenty-five keys at once: for each key, the tool compares the counts it would imply against the expected pattern for the language you chose, and the key with the closest fit is almost always the right one. It is listed first, with a relevance score showing how far ahead of the runner-up it is.

Narrowing it to one with a known word

Statistics need letters to work with. On a short message — a few words, a name, a password hint — the ranking is a hint rather than an answer, and the tool says so instead of pretending otherwise. If you know a word that must appear in the plaintext, type it into the known-word box: every candidate that does not really contain it is filtered out, which usually leaves exactly one regardless of how short the message is. Pressing a candidate applies its key, so you can go straight from a ranked list to a decoded document.

  • Paste the ciphertext — or open the file it is in.
  • Pick the language — you expect the plaintext to be in — this chooses which letter-frequency table the scoring uses.
  • Press Find the key — and read the top row. The relevance percentage says how confident the ranking is.
  • Add a known word — if the top few rows all look plausible, or if the message is too short to score.
  • Press the winning row — to apply that key to the whole document.

Rotating in an alphabet of your own

The built-in ciphers all work on the basic Latin alphabet or on ASCII, which is fine for English and useless for anything else. A custom alphabet fixes that: list the characters in the order you want them rotated and the cipher works within that list, leaving everything else alone.

  • Cyrillic and Greek — are ready-made, so a Russian or Greek message rotates in its own alphabet rather than passing through unchanged.
  • Historical Latin — is the 23-letter alphabet without J, U and W. A cipher built against it lands on different letters at the same shift, so a modern 26-letter tool cannot decode it.
  • Letters and digits together — gives a 36-character alphabet, useful for reference codes and licence keys.
  • The shift range follows the alphabet — an eight-character alphabet offers shifts one to seven, not one to twenty-five — the extra values would silently wrap onto ones already available.
  • Repeated characters are refused — an alphabet containing the same character twice maps two inputs onto one output, so the cipher cannot be undone. The tool says which character is duplicated rather than producing a result that cannot be reversed.

How case is handled

If your alphabet contains only one case of each letter, the other case is rotated in parallel and case is preserved — typing the uppercase Latin alphabet and pasting lowercase text does what you expect. If your alphabet already contains both cases of a letter, it is taken exactly as written, because at that point you have stated the case handling yourself and the tool should not second-guess it.

What changes, and what does not

Everything outside the cipher's alphabet is copied through byte for byte. That is a guarantee, not a best effort, and it is what makes it safe to rotate a subtitle file or a CSV without breaking its structure.

  • Digits, spaces, punctuation and line breaks survive every letter cipher unchanged, and Windows line endings stay Windows line endings.
  • Accented letters, Cyrillic, Greek, Arabic, Chinese and every other script pass through the letter ciphers untouched — they are not in the alphabet, so there is nothing to rotate them to.
  • Emoji and other characters outside the basic range survive intact, including the ones made of two code units, which is a place naive implementations split a character in half.
  • A file's text encoding is preserved: a UTF-16 file comes back as UTF-16, with its byte-order mark, rather than being silently converted.
  • The result is always the same number of characters as the input, for every cipher on this page.

The changed-character count

Under every result is a count of how many characters actually changed. It sounds trivial and it is the single most useful number on the page: running ROT5 over ordinary prose changes nothing, and a tool that silently hands back the input is indistinguishable from a broken one. If that count is zero or surprisingly low, the cipher is pointed at the wrong alphabet.

Limits, files and what this is not for

The tool opens plain text: .txt, .md, .csv, .tsv, .json, .xml, .html, .yaml, .log, .srt, .vtt and a few more. Anything else is refused at the point you choose it, with a link to the tool that can convert it first — a PDF goes to the PDF text extractor, a Word document to the Word converter, an image to the image text reader. You never reach a progress bar that then fails.

  • Free — one file at a time, up to 25 MB, with every cipher, the ranked key finder, the known-word filter and the letter chart all included.
  • Pro — up to twenty files at once delivered as a single ZIP, file sizes limited by your device rather than by us, your own alphabets, and the full ranked candidate list exported as CSV or TXT.
  • Nothing is gated that would break the tool — every cipher and the key finder work on Free, because a cipher tool that withholds the decode is not limited, it is broken.

This is not encryption

It is worth repeating at the end as well as the beginning. Twenty-five keys is not a keyspace, it is a short list, and this page will walk that list for you in about twenty milliseconds. Rotation ciphers are for spoilers, puzzles, classroom demonstrations, capture-the-flag challenges and light obfuscation of things that do not matter. For anything that does matter — passwords, personal data, anything with a legal or financial consequence — use real cryptography, and do not let the fact that the output looks scrambled persuade you otherwise.

Rotating a 10 MB document takes about 43 ms on a mid-range laptop, off the main thread, so the page keeps responding while it works.

Frequently asked questions

How does the text rotator work?

It replaces each character with another one a fixed number of places along an alphabet. Pick ROT13 for a fixed 13-place shift, or Caesar and set any shift from 1 to 25. Case is preserved, so capitals map to capitals, and anything outside the chosen alphabet — digits, spaces, punctuation, accented and non-Latin letters — passes through untouched. The output updates as you type.

What is the difference between ROT13 and a Caesar cipher?

ROT13 is a Caesar cipher fixed at a shift of 13. Because 13 is exactly half of 26, applying it twice returns the original text, so one operation both encodes and decodes. Caesar lets you pick any shift from 1 to 25, and those are not self-inverse: a message encoded with a shift of 3 is decoded by shifting back 3, not forward 3. That is why this tool has an explicit Encode and Decode switch rather than asking you to work out the opposite shift yourself.

How do I decode a Caesar cipher when I do not know the shift?

Press Find the key. The tool counts how often each letter appears and compares that pattern against the letter frequencies of the language you select — English, Spanish, French, German, Portuguese or Indonesian — then scores all 25 possible keys and puts the most likely one first with a relevance percentage. If you already know a word that appears in the message, type it into the known-word box and only the candidates that really contain it are kept, which usually leaves exactly one.

What are ROT5, ROT18, ROT47 and Atbash?

ROT5 rotates the digits 0 to 9 by five places and leaves letters alone. ROT18 is ROT13 and ROT5 together, so it handles a string containing both. ROT47 rotates all 94 printable ASCII characters — letters, digits and punctuation — by 47 places, which is why its output looks like symbols rather than words. Atbash mirrors the alphabet instead of rotating it, so A becomes Z and B becomes Y. All four are self-inverse: running them a second time gives back what you started with.

Can I use my own alphabet, or a non-English one?

Yes. Choose the custom cipher and either pick a ready-made alphabet — Cyrillic, Greek, the historical 23-letter Latin alphabet without J, U and W, or letters plus digits — or type your own. The shift range follows the alphabet's length automatically, so an eight-character alphabet offers shifts one to seven rather than pretending there are 25. An alphabet with a repeated character is refused, because a rotation that maps two characters onto one cannot be undone.

What happens to numbers, spaces, symbols and emoji?

Anything that is not in the cipher's alphabet is copied through byte for byte. For the letter ciphers that means digits, spaces, punctuation, accented letters, Cyrillic, Greek, emoji and line breaks all survive exactly as they were, and the result is the same length as the input. The tool also tells you how many characters it actually changed, which is the quickest way to spot a cipher aimed at the wrong alphabet — running ROT5 over ordinary prose changes nothing at all.

Is my text private, and can I rotate a whole file?

It all runs on your device, not our servers. There is no upload and no server round trip: the transformation happens in the page itself, which is also why it keeps working if you lose your connection after the page has loaded. You can rotate a pasted message or open a plain-text file — .txt, .md, .csv, .json, .log, .srt, .vtt and more — up to 25 MB free, one file at a time, with larger files and batches of up to twenty on Pro.

Is ROT13 or Caesar secure enough to hide anything real?

No, and it is worth being blunt about it. There are only 25 non-zero Caesar keys, so anyone can try all of them in seconds — this page does exactly that on demand. These are teaching ciphers and puzzle ciphers: use them for spoilers, classroom demonstrations, capture-the-flag challenges and light obfuscation, and use real encryption for passwords, personal data or anything with a consequence attached.

4.5out of 5

from 120 ratings

Rate this tool

Tap a star — it takes a second