{"id":67672,"date":"2026-12-01T15:22:11","date_gmt":"2026-12-01T12:22:11","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=67672"},"modified":"2026-12-01T15:22:11","modified_gmt":"2026-12-01T12:22:11","slug":"rot13-encoder-and-decoder","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/web-tools\/rot13-encoder-and-decoder\/","title":{"rendered":"ROT13 Encoder and Decoder"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Convert Text with ROT13, ROT5, ROT18 and ROT47<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"67672\" data-favorite-title=\"ROT13\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/web-tools\/rot13-encoder-and-decoder\/\" data-favorite-excerpt=\"Encode or decode ROT13 text online, with ROT5, ROT18 and ROT47 variants. Paste any text, choose the shift, and copy the converted result instantly.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-d-edit\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/web-tools\/rot13-encoder-and-decoder\/\" method=\"POST\" class=\"calculator\" id=\"calculator-67672\" data-post=\"67672\"><fieldset class=\"fieldset-input\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field is-single\" id=\"input-1\"><label for=\"field-1\">Text to convert<\/label><textarea id=\"field-1\" name=\"text_to_convert\">The quick brown fox jumps over the lazy dog 123!<\/textarea><\/div><div class=\"field\" id=\"input-2\"><label for=\"field-2\">Variant<\/label><div class=\"grid grid-cols-1\"><select id=\"field-2\" name=\"variant\"><option value=\"rot13\" selected>ROT13 \u2014 letters A\u2013Z shifted by 13 (classic)<\/option><option value=\"rot5\">ROT5 \u2014 digits 0\u20139 shifted by 5<\/option><option value=\"rot18\">ROT18 \u2014 ROT13 letters + ROT5 digits combined<\/option><option value=\"rot47\">ROT47 \u2014 printable ASCII 33\u2013126 shifted by 47<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field is-checkbox\" id=\"input-3\"><input type=\"checkbox\" id=\"field-3\" value=\"1\" checked=\"checked\"\/><label for=\"field-3\">Keep letter case<\/label><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"67672\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your ROT Result<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>What this ROT converter does<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-2\"><span class=\"field-title\"><span>Converted text \u2014 ready to copy<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-3\"><span class=\"field-title\"><span>Substitution table \u2014 every character and where it lands<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>Where ROT13 is actually used<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"67672\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>ROT13 Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ E(x) = ((x - b + s) mod m) + b \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(x\\) \u2014 character code position of the input letter (for example 0\u201325 within the alphabet)<\/li>\n<li>\\(b\\) \u2014 base position of the alphabet block: 65 for A\u2013Z or 97 for a\u2013z in practice<\/li>\n<li>\\(s\\) \u2014 shift amount: 13 for ROT13, 5 for digits in ROT5\/ROT18, or 47 of the 94 printable ASCII positions for ROT47<\/li>\n<li>\\(m\\) \u2014 modulus: 26 for letters, 10 for digits, 94 for printable ASCII<\/li>\n<\/ul>\n<p>The formula rotates a character forward by \\(s\\) positions and wraps around at the end of its block. Because \\(2 \\times 13 = 26\\), ROT13 applied twice returns the original text: \\(E(E(x)) = x\\). ROT5 and ROT47 satisfy the same self-inverse property with moduli 10 and 94.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>ROT13 \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> using the default text <em>The quick brown fox jumps over the lazy dog 123!<\/em> with the ROT13 variant and letter case kept.<\/p>\n<p>\\[ T(19) -&gt; (19 + 13) mod 26 = 6 = G \\]<\/p>\n<p>\\[ h(7) -&gt; (7 + 13) mod 26 = 20 = U \\]<\/p>\n<p><strong>Result:<\/strong> <code>Gur dhvpx oebja sbk whzcf bire gur ynml qbt 123!<\/code> \u2014 the 35 letters are shifted, while digits, spaces, punctuation and the exclamation mark pass through unchanged for ROT13.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Paste your text into <strong>Text to convert<\/strong>. It accepts letters, digits, spaces and punctuation; empty input is not converted.<\/li>\n<li>Choose <strong>Variant<\/strong>: ROT13 for letters only, ROT5 for digits only, ROT18 for letters and digits together, or ROT47 for every printable ASCII character from code 33 to 126.<\/li>\n<li>Leave <strong>Keep letter case<\/strong> checked to preserve uppercase and lowercase, or uncheck it to flatten letters to uppercase. This option does not change ROT47 behavior.<\/li>\n<li>Read <strong>Your ROT Result<\/strong>: a short summary, the converted text ready to copy, the substitution mapping, and notes on where ROT13 is used.<\/li>\n<li>To reverse the operation, paste the output back in and run the same variant again; these rotations are self-inverse.<\/li>\n<\/ol>\n<h2>What ROT13 is and why it matters<\/h2>\n<p>ROT13 is a Caesar-style substitution cipher that replaces each English letter with the letter 13 positions later in the alphabet. A becomes N, B becomes O, M becomes Z, and N becomes A again. It exists for gentle obfuscation, not for secrecy: it hides spoilers, punchlines and puzzle answers from casual scrolling while remaining trivial to read for anyone willing to run the same transformation.<\/p>\n<p>The practical appeal is symmetry. Since 13 is exactly half of 26, encoding and decoding are the same action, so one button is enough. ROT5 applies the same idea to decimal digits using a half-cycle of 10, ROT18 combines both, and ROT47 extends the rotation across the 94 printable non-space ASCII characters, making the output less recognizable because letters, digits and symbols are all scrambled together.<\/p>\n<p>Use the output as a polite warning label rather than a lock. If you need real confidentiality, hashing or encryption is required; see tools such as <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/sha-256-hash-generator\/\">SHA-256 Hash<\/a> for one-way fingerprints and <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/vigenere-cipher-encode-and-decode\/\">Vigen\u00e8re Cipher<\/a> for a classic keyed cipher. For general text cleanup nearby, try <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/case-converter\/\">Case Converter<\/a>. ROT13 is closely related to the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/caesar-cipher-encoder-and-decoder\/\">Caesar Cipher<\/a>, where any shift can be chosen instead of the fixed half-alphabet shift.<\/p>\n<h2>Assumptions, limitations and practical tips<\/h2>\n<ul>\n<li>ROT13 is not encryption. Anyone with this page, Unix <code>tr<\/code>, or a moment of patience can reverse it, so never use it for passwords, personal data, keys or private messages.<\/li>\n<li>ROT13, ROT5 and ROT18 preserve characters outside their target ranges. Spaces, accents, emoji, CJK characters and most punctuation pass through untouched; ROT47 changes printable ASCII 33\u2013126 but still leaves spaces, tabs, newlines and non-ASCII text unchanged.<\/li>\n<li>Letter case handling depends on the <strong>Keep letter case<\/strong> setting and on the variant. ROT47 treats uppercase and lowercase as distinct ASCII codes and ignores that checkbox.<\/li>\n<li>The mapping is language-specific and alphabet-specific: ROT13 is designed around A\u2013Z\/a\u2013z. Text in other writing systems needs a different tool.<\/li>\n<li>For very large pastes, keep text under roughly 200,000 characters so browser rendering and the substitution table stay responsive.<\/li>\n<li>If decoded text looks wrong, confirm you used the same variant used for encoding; ROT47 output cannot be undone by ROT13 and may include symbols that editors or terminals display unevenly.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Encode or decode ROT13 text online, with ROT5, ROT18 and ROT47 variants. Paste any text, choose the shift, and copy the converted result instantly.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[63],"tags":[65],"class_list":["post-67672","post","type-post","status-publish","format-standard","hentry","category-web-tools","tag-text-tools"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=67672"}],"version-history":[{"count":2,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67672\/revisions"}],"predecessor-version":[{"id":67773,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67672\/revisions\/67773"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=67672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=67672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=67672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}