Caesar Cipher & ROT13 Calculator

This tool encodes and decodes text using the Caesar cipher, one of the oldest and simplest forms of encryption, including the popular ROT13 variant. The Caesar cipher works by shifting every letter a fixed number of places along the alphabet: with a shift of three, A becomes D, B becomes E, and so on, wrapping around from Z back to A. It is named after Julius Caesar, who is said to have used it to protect military messages. ROT13 is simply a Caesar cipher with a shift of thirteen, and it has a charming property: because thirteen is exactly half of twenty-six, applying it twice returns the original text, so the same operation both encodes and decodes. ROT13 is widely used online not for real security but to lightly hide spoilers, puzzle answers and punchlines, so they are not read by accident. This tool handles any shift. You enter your text and choose a shift value, and the calculator shifts each letter accordingly, leaving numbers, spaces and punctuation untouched, and preserving upper and lower case. To decode a message, simply use the negative of the shift that was used to encode it, or for ROT13 use thirteen again. The result updates as you type. Use it to create simple puzzles and ciphers, to decode a ROT13 message, to teach how shift ciphers work, or just for fun. It is important to understand that the Caesar cipher offers no real security: with only twenty-five possible shifts, anyone can break it in moments by trying them all, and it falls instantly to frequency analysis. It is a piece of history and a teaching tool, not a way to protect anything that matters.

-

Shifts letters by the given amount, wrapping around the alphabet. Use a negative shift to decode, or 13 again for ROT13. No real security; for fun and learning only.

How it works

Each letter is moved forward through the alphabet by the shift amount, wrapping from Z back to A, while its case is kept. Numbers, spaces and punctuation are left unchanged. A shift of 13 gives ROT13, which decodes itself when applied a second time. A negative shift reverses any positive shift to decode.

Worked example

With a shift of 13, the text Hello, World! becomes Uryyb, Jbeyq! Each letter moves 13 places: H becomes U, e becomes r, and so on, while the comma, space and exclamation mark stay put. Applying a shift of 13 again to Uryyb, Jbeyq! returns the original Hello, World!

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.