ROT13 Decoder & Caesar Cipher Solver

Free ROT13 decoder and encoder. Decode or encode ROT13 instantly in your browser, use any Caesar shift 1–25, and brute-force all 26 shifts at once.

By

Advertisement

A ROT13 Decoder That Also Cracks Any Caesar Shift

ROT13 is a letter–substitution cipher that rotates every letter 13 places through the 26–letter alphabet: A becomes N, B becomes O, and Z wraps around to M. This ROT13 decoder and encoder applies that transformation instantly as you type, in your browser, with nothing uploaded to a server. Because 13 is exactly half of 26, the same operation both encodes and decodes — so there is only one button to press and no way to get the direction wrong.

The tool is not limited to ROT13. The shift slider covers every Caesar shift from 0 to 25, with one–click presets for ROT13 (shift 13) and the classical Caesar cipher (shift 3), a separate encode/decode mode, an option to rotate digits alongside letters, and a brute–force panel that shows all 26 possible decodings of your text at once. If you have a string from a CTF challenge, a puzzle, or a geocache hint and you do not know the shift, the brute–force view hands you the answer without any guessing.

How to Use the ROT13 Decoder

  • Decode ROT13: leave the shift at 13 and paste the encoded text into the input box. The decoded result appears in the output panel immediately — encode and decode mode give identical results at shift 13, which is the whole point of the cipher.
  • Encode a spoiler: type your plaintext, keep shift 13, and copy the output with the copy button. Anyone can reverse it by pasting it back into any ROT13 tool.
  • Use a different Caesar shift: drag the shift slider to any value from 0 to 25, or hit the Caesar (shift 3) preset. Set the mode to Encode to shift forward and Decode to shift back.
  • Crack an unknown shift: paste the ciphertext and open the brute–force panel. All 26 shifts are listed with their full decoded output; scan for the one that reads as English and click it to load that shift into the main converter.
  • Rotate digits too: uncheck “Preserve Numbers” and digits are rotated by the same amount within 0–9. With shift 13 that behaves like ROT5 on the numeric characters — the ROT18 idea — while letters continue to rotate by 13.
  • Swap input and output with the swap button to feed a result straight back in, which is a quick way to confirm a round trip.

Punctuation, spaces and symbols always pass through untouched, and capitalisation is preserved: an uppercase letter stays uppercase after rotation.

The Full ROT13 Alphabet Mapping

Every letter is paired with the one 13 places away, and each pair swaps in both directions. That is what makes ROT13 an involution — a function that is its own inverse.

PlainABCDEFGHIJKLM
ROT13NOPQRSTUVWXYZ
PlainNOPQRSTUVWXYZ
ROT13ABCDEFGHIJKLM

Read either half of the table in either direction — the mapping is identical both ways. Worked examples: Hello World! becomes Uryyb Jbeyq!, and running Uryyb Jbeyq! through the tool again returns Hello World!. The phrase Encrypted in a simple cipher becomes Rapelcgrq va n fvzcyr pvcure. Note how the exclamation mark, the spaces and the capital letters survive intact — only the 52 letter characters are touched.

Why the Shift Is 13, Mathematically

Assign each letter a number, A = 0 through Z = 25. Encoding with a Caesar shift of n is E(x) = (x + n) mod 26 and decoding is D(x) = (x − n) mod 26. Set n = 13 and apply it twice:

(x + 13 + 13) mod 26 = (x + 26) mod 26 = x mod 26 = x

The two shifts cancel exactly, because 26 is congruent to 0 modulo 26. Thirteen is the only non–zero shift with this property — the unique non–identity involution in the cyclic group of order 26. Every other Caesar shift needs a separate decode step and you must remember which direction you were going. That is the entire practical advantage of ROT13 over its 24 siblings, and it is why the convention stuck: one operation, no key to track, no direction to get wrong.

ROT13 Is Not Encryption

This distinction matters more than any other on this page. Encryption depends on a secret key that the attacker does not possess. ROT13 has no key at all: the shift is fixed, public and universally known, so anyone who recognises the cipher reverses it in seconds. What ROT13 provides is obfuscation — it stops text from being read accidentally, which is a genuine and useful property, but it stops nobody who is actually looking.

The wider Caesar family is barely better. With only 25 usable shifts, exhaustive search is trivial — the brute–force panel in this tool performs exactly that attack and displays all 26 candidate plaintexts at once. Even without brute force, frequency analysis breaks it immediately: English text is roughly 12.7% E, 9.1% T and 8.2% A, and a Caesar shift preserves that distribution perfectly while relabelling it. Under ROT13, R carries E’s 12.7%, G carries T’s 9.1%, and N carries A’s 8.2%. Count the letters, find the offset, done. Arab mathematicians worked this out in the ninth century; it has not been a secure technique for over a millennium.

ROT13 vs Caesar vs Atbash vs Modern Encryption

PropertyROT13Caesar cipherAtbashAES–256
TypeFixed substitution, shift 13Substitution, shift 1–25Substitution, mirror A↔ZBlock cipher with key schedule
KeyNone — shift is publicThe shift valueNone — mapping is public256–bit secret key
Key space125 usable shifts12256
Self–inverse?YesNo, except shift 13YesNo — distinct encrypt/decrypt
AffectsLetters A–Z onlyLetters A–Z onlyLetters A–Z onlyArbitrary binary data
How it breaksRecognise it — instantBrute–force 25 keys, or frequency analysisRecognise it — instantNo known practical attack
Provides security?NoNoNoYes
Real useHiding spoilers and punchlinesTeaching, puzzles, historyTeaching, puzzles, biblical textsProtecting confidential data

Key space is not the only axis on which modern ciphers pull away. A real algorithm is built for diffusion and confusion — the two design goals Claude Shannon formalised in 1945. Diffusion spreads the influence of every plaintext bit across the whole ciphertext, and confusion makes the relationship between key and output as tangled as possible, which together produce the avalanche effect: change one bit of input and roughly half the output bits flip. ROT13 has neither property. Its mapping is perfectly local and perfectly stable — A is always N, in every message, forever — which is exactly what makes pattern analysis work against it and useless against AES. Modern schemes also add guarantees ROT13 has no concept of: authentication and integrity, so tampering is detected rather than silently accepted, and forward secrecy in protocols like TLS, so compromising one session key does not retroactively expose earlier ones.

The classical three differ only in which fixed pattern they use; none has meaningful key space, so none provides security. AES–256 differs on the single axis that matters: a 256–bit secret key yields roughly 1077 possible transformations, so knowing the algorithm tells an attacker nothing without the key. That gap — a handful of guessable arrangements versus an astronomically large keyed space — is the entire difference between obfuscation and encryption. Atbash, incidentally, is the other keyless involution: it mirrors the alphabet so A becomes Z and B becomes Y. It is an ancient Hebrew cipher that appears in the Book of Jeremiah, where ROT13 is a 1980s Usenet convention, but cryptographically the two are equally empty.

Where ROT13 Came From

The Caesar cipher is the ancestor. Suetonius records that Julius Caesar protected military correspondence around 58 BC by shifting each letter three places — A to D, B to E. It worked at the time not because it was strong but because literacy was rare and cryptanalysis did not yet exist as a discipline. Once frequency analysis was developed, simple substitution was finished as a security technique, and the arms race moved on to polyalphabetic schemes like Vigenère, then to rotor machines like Enigma, and eventually to the keyed algorithms in use today.

ROT13 arrived in that lineage as a convention rather than a cipher. Usenet users adopted it around 1982–1983 in newsgroups such as net.jokes as a standard way to hide punchlines and potentially offensive material behind a deliberate decode step. The Unix one–liner tr 'A-Za-z' 'N-ZA-Mn-za-m' made applying it effortless on any terminal, and the convention outlived the newsgroups that created it.

What ROT13 Is Legitimately Used For

  • Spoiler protection: forums and review sites still encode plot twists so readers choose whether to decode rather than being spoiled by scanning the page.
  • Content warnings: obscuring a joke or sensitive passage behind a decode step turns exposure into an opt–in action.
  • Puzzle hints and geocaching: hint text and solutions are conventionally ROT13–encoded so they can be revealed only when a player is stuck.
  • Light email obfuscation: encoding an address in page source reduces harvesting by the simplest scrapers, though it stops nothing sophisticated.
  • Teaching cryptography: ROT13 introduces substitution, key space, frequency analysis and brute force with no mathematical overhead, which is why it opens most cryptography courses.
  • CTF and puzzle solving: ROT13 and small Caesar shifts appear constantly in beginner capture–the–flag challenges as a first encoding layer.

Native spoiler markup now exists on most platforms — Discord’s ||spoiler||, Reddit’s >!spoiler!<, the HTML <details> element — and where it exists it is the better choice. ROT13 persists because it needs no platform support at all: it works in plain–text email, in code comments, in an IRC channel, and in decades of archived content that already uses it.

When Not to Use ROT13

Never for anything that must stay confidential. Passwords, personal data, financial records, health information and credentials require real encryption — AES–256 or equivalent. ROT13 cannot authenticate a sender, cannot detect tampering, and cannot protect a secret embedded in code or configuration; obscuring a hardcoded credential with it provides precisely zero protection against anyone who reads the file. No regulatory framework — HIPAA, PCI DSS, GDPR — recognises it as encryption, so using it in place of encryption is a compliance finding waiting to happen. Reach for the Hash Generator for integrity checks and a proper symmetric cipher for confidentiality; ROT13’s only correct application is voluntary obfuscation. It is equally wrong for anything that must stay secret over time: even mundane information with a long secrecy requirement needs real encryption, because ROT13 buys you nothing but the seconds it takes a reader to recognise the pattern.

Two misconceptions are worth naming directly. The first is that ROT13 offers “a bit” of security — it offers none; the only thing it stops is an unintentional glance. The second is that ROT13 is obsolete. It was never viable as encryption, so it cannot have become obsolete at a job it never did; for the job it actually does — voluntary, reversible obfuscation that works in any medium that carries text — it remains perfectly adequate and is still in daily use.

ROT13 Variants

VariantWhat it rotatesSelf–inverse?
ROT13Letters A–Z by 13Yes
ROT5Digits 0–9 by 5Yes
ROT18ROT13 on letters plus ROT5 on digitsYes
ROT4794 printable ASCII characters (! to ~) by 47Yes

All four are self–inverse for the same modular reason, and none of them adds security — they simply extend the obfuscation to more character classes. Turning off “Preserve Numbers” in the tool above rotates digits alongside letters, giving you the ROT18 behaviour when the shift is 13.

ROT13 in Code

LanguageOne–liner
Shelltr 'A-Za-z' 'N-ZA-Mn-za-m'
Pythoncodecs.encode(text, 'rot_13')
JavaScripts.replace(/[a-z]/gi, c => String.fromCharCode((c.charCodeAt(0) & 96) + (c.toLowerCase().charCodeAt(0) - 84) % 26))
PHPstr_rot13($text)
Vimg?G (or g? with any motion)
EmacsM-x rot13-region

Writing your own is a standard exercise: for each character, if it is a letter, find its 0–25 position, add 13, take the result modulo 26, and map back to a letter; otherwise pass it through unchanged. Handle uppercase and lowercase from separate base values so capitalisation survives.

Related Cipher Tools

If your ciphertext is not ROT13, the neighbouring tools will place it. The Caesar Cipher tool focuses on arbitrary shifts with automatic key detection. The Cipher Identifier analyses an unknown ciphertext and suggests which classical scheme produced it — the right first stop when brute–forcing 26 shifts yields nothing readable. The Atbash Cipher tool handles the mirrored alphabet, the Vigenère Cipher tool covers keyword–based polyalphabetic substitution, and the XOR Cipher tool steps up to byte–level operations. All of them are in the free security tools collection.

Frequently Asked Questions

What is ROT13?+

ROT13 is a substitution cipher that replaces every letter with the one 13 places further along the alphabet, wrapping around at Z. A becomes N, N becomes A, and non–letter characters are unchanged. It is a Caesar cipher with the shift permanently fixed at 13, and it is used for obfuscation — hiding spoilers and puzzle answers — not for security.

How do I decode ROT13?+

Apply ROT13 again. Because the cipher is its own inverse, encoding and decoding are the same operation, so pasting encoded text into the decoder above with the shift at 13 returns the original. On the command line, tr 'A-Za-z' 'N-ZA-Mn-za-m' does the same job.

Is ROT13 encryption?+

No. Encryption relies on a secret key that the attacker lacks; ROT13 has no key at all. It is a single fixed, publicly known transformation, so anyone who recognises it reverses it instantly. It is obfuscation — it prevents accidental reading and nothing more.

Why does ROT13 use a shift of 13?+

Because 13 is exactly half of 26. Shifting 13 places twice gives a total shift of 26, which wraps completely around to the original letter, so the same operation encodes and decodes. It is the only non–trivial Caesar shift with this self–reversing property.

What is the difference between ROT13 and the Caesar cipher?+

ROT13 is a Caesar cipher, with the shift fixed at 13. A general Caesar cipher can use any shift from 1 to 25, and that shift acts as a key you must know to decode. ROT13 fixes and publishes the shift, so there is no key and no separate decode step. Every ROT13 is a Caesar cipher; almost no Caesar cipher is ROT13.

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

Brute force it — there are only 25 possibilities. Paste the ciphertext into the tool above and open the brute–force panel to see all 26 shifts decoded at once, then pick the one that reads as English. For longer texts, frequency analysis reaches the same answer directly: the most common ciphertext letter almost always maps from E.

How is ROT13 different from Atbash?+

Both are keyless self–inverse substitution ciphers, but the mapping differs. ROT13 shifts each letter 13 places, so A becomes N. Atbash mirrors the alphabet, so A becomes Z, B becomes Y and C becomes X. Atbash is far older — it appears in the Book of Jeremiah — while ROT13 dates from 1980s Usenet. Neither offers any security.

Does ROT13 change numbers and punctuation?+

Standard ROT13 rotates only the letters A–Z and a–z; digits, spaces, punctuation and symbols pass through unchanged, and capitalisation is preserved. This tool can optionally rotate digits as well — uncheck “Preserve Numbers” — which reproduces the ROT18 variant.

Is ROT13 safe for sensitive data?+

No, never. It provides no protection for passwords, personal data, financial details or credentials, and no compliance framework accepts it as encryption. Use AES–256 or another modern algorithm for anything that must remain confidential.

What is ROT13 actually used for today?+

Its legitimate uses are all non–cryptographic: hiding spoilers and puzzle solutions in forums, gating an offensive joke behind a deliberate decode step, hiding geocaching hints, lightly obscuring an email address from simple scrapers, and teaching cryptography fundamentals. In every case the goal is preventing accidental reading, not stopping a determined reader. This tool is free, needs no signup, and runs entirely in your browser, so nothing you encode leaves your machine.

Related tools

This tool is provided for informational and educational purposes only. While we strive for accuracy, we make no warranties about the completeness or reliability of results. Results are based on the information you enter and do not constitute a security audit, a formal compliance assessment, or legal advice, and they do not establish that any system or organisation meets a given standard. Coverage of a framework may be partial — check what the tool states it assesses. For anything you intend to rely on, consult a qualified assessor.