# Documentation/Calc Functions/ROT13

Other languages:
English • ‎Nederlands

ROT13

Text

## Summary:

Applies a simple substitution cipher to the supplied string, by replacing any letter that is in the English alphabet with the letter that is 13 places after it in the alphabet (wrapping around to the beginning of the alphabet if necessary).

ROT13 provides a very weak encryption that may be used to obfuscate the casual reader.

ROT13 is its own inverse, so that =ROT13(ROT13(Text)) returns the original string Text.

ROT13(Text)

## Returns:

Returns a text string that is the encrypted version of the supplied string.

## Arguments:

Text is a text string (in quotation marks), or a reference to a cell containing a text string, that is the string to be encrypted.

ROT13 only affects the 52 letters of the English alphabet, a…z and A…Z. Any other character in the input string is unaffected. The following table shows how each letter is encrypted:

ROT13 character replacement
Input Character
(lowercase)
Output Character
(lowercase)
Input Character
(uppercase)
Output Character
(uppercase)
a n A N
b o B O
c p C P
d q D Q
e r E R
f s F S
g t G T
h u H U
i v I V
j w J W
k x K X
l y L Y
m z M Z
n a N A
o b O B
p c P C
q d Q D
r e R E
s f S F
t g T G
u h U H
v i V I
w j W J
x k X K
y l Y L
z m Z M

## Examples:

Formula Description Returns
=ROT13("Hello World!") Here the function encrypts the supplied string and returns the string "Uryyb jbeyq!". Notice that neither the space nor the exclamation mark are modified. Uryyb jbeyq!
=ROT13(D1) where cell D1 contains the string "Uryyb jbeyq!", which is the same as the string returned in the previous example. Here the function encrypts the supplied string and returns the string "Hello World!", demonstrating that ROT13 is its own inverse. Hello World!
=ROT13("Gur Qbphzrag Sbhaqngvba jnf sbhaqrq va Frcgrzore 2010."). Here the function encrypts the supplied string and returns the string "The Document Foundation was founded in September 2010.". Notice how the digits and the full stop were unaffected by ROT13. The Document Foundation was founded in September 2010.

None.

None.

None.