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 Inventive HQ
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.
Punctuation, spaces and symbols always pass through untouched, and capitalisation is preserved: an uppercase letter stays uppercase after rotation.
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.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ROT13 | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Plain | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| ROT13 | A | B | C | D | E | F | G | H | I | J | K | L | M |
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.
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.
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.
| Property | ROT13 | Caesar cipher | Atbash | AES–256 |
|---|---|---|---|---|
| Type | Fixed substitution, shift 13 | Substitution, shift 1–25 | Substitution, mirror A↔Z | Block cipher with key schedule |
| Key | None — shift is public | The shift value | None — mapping is public | 256–bit secret key |
| Key space | 1 | 25 usable shifts | 1 | 2256 |
| Self–inverse? | Yes | No, except shift 13 | Yes | No — distinct encrypt/decrypt |
| Affects | Letters A–Z only | Letters A–Z only | Letters A–Z only | Arbitrary binary data |
| How it breaks | Recognise it — instant | Brute–force 25 keys, or frequency analysis | Recognise it — instant | No known practical attack |
| Provides security? | No | No | No | Yes |
| Real use | Hiding spoilers and punchlines | Teaching, puzzles, history | Teaching, puzzles, biblical texts | Protecting 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.
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.
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.
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.
| Variant | What it rotates | Self–inverse? |
|---|---|---|
| ROT13 | Letters A–Z by 13 | Yes |
| ROT5 | Digits 0–9 by 5 | Yes |
| ROT18 | ROT13 on letters plus ROT5 on digits | Yes |
| ROT47 | 94 printable ASCII characters (! to ~) by 47 | Yes |
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.
| Language | One–liner |
|---|---|
| Shell | tr 'A-Za-z' 'N-ZA-Mn-za-m' |
| Python | codecs.encode(text, 'rot_13') |
| JavaScript | s.replace(/[a-z]/gi, c => String.fromCharCode((c.charCodeAt(0) & 96) + (c.toLowerCase().charCodeAt(0) - 84) % 26)) |
| PHP | str_rot13($text) |
| Vim | g?G (or g? with any motion) |
| Emacs | M-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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Auto-detect cipher types from ciphertext using frequency analysis and pattern matching.
Decode and encode Caesar cipher text online. Brute force all 25 shifts, frequency analysis, auto-detection, and interactive cipher wheel.
Ancient Hebrew reverse alphabet cipher (A↔Z, B↔Y). Self-inverse cipher.
Free XOR cipher tool: encrypt, decrypt, and brute force XOR online. Break repeating-key XOR automatically, crib-drag known plaintext, and decode single- or multi-byte keys. Text, hex & Base64. 100% client-side.